lucasmauricio / FastGate

A golang Fast Gateway based on redirecting traffic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FastGate Logo

Release Software License Travis Go Report Card

A Fast, light and Low Overhead API Gateway written in GO.

Fast, light and Low Overhead API Gateway written in GO FastGate works by redirecting traffic to the correct IP. The connection to the Gateway closes just after the redirect.

Installation

To install fastgate, you can download the latest release binary from the Dowload page , or compile it from source with GO.

Install Golang

If you need to install GO, please refer to the golang.org Download Page, and follow instructions, or use a package manager (Most are very outdated).

For macOS users, I do recommend installing from homebrew. The mantainers are doing a amazing job keeping up with updates. Note that you still need to configure home path, but brew itself will teach you on how to do it. Run : brew install go

Fastgate Source instalation

go get github.com/auyer/FastGate
cd $GOPATH/src/github.com/auyer/FastGate
go install

Deploy with Docker

By default, the Dockerfile picks the configuration file, TLS key and TLS cert from the same folder as the sourcecode.

  docker build -t fastgate .
  docker run -p YOUR_HTTP:8000 -p YOUR_HTTPS:8443 -d fastgate

Usage

  fastgate -config ./path_to_config_file

A sample to the configuration file can be found in config.model.json

To manually register (and test) FastGate, Send a POST request to yourip:yourport/fastgate/ with a JSON like follows:

{
  "address" : "https://yourEndpoint:8080"
  "uri"     : "/api/your_resource"
}

Now send the desired request to yourip:yourport/api/your_resource and see it working !

TODO

  • Write a To-Do list

About

A golang Fast Gateway based on redirecting traffic

License:GNU General Public License v3.0


Languages

Language:Go 96.4%Language:Makefile 3.6%