API gateway
A simple implementation of api gateway pattern
How to use
Example:
./gatewey
-listen=127.0.0.1:8181
// service 1
-endpoint="/s1"
-dest=http://127.0.0.1:9091
// service 2
-endpoint="/s2
-dest=http://127.0.0.1:9092
// another services...
Where:
- listen - it's our gateway address
- endpoint - it's a endpoint for service called s1
- dest - it's a destination / real address of given service s1
So everything which is sending to the our gateway on /s1 route will forward to the destination address specified in the dest param. You can use combination of endpoint and dest param many times.