httpgrpc
Golang Microservice API to convert external HTTP endpoints on a proxy to internally exposed GRPC messages. Allows a generic proxy to talk to services via a standard message while still allowing each service to maintain its API using GRPC and protocol buffers.
There are multiple implemenations that follow this basic intent already (HTTP+JSON reverse proxied to GRPC) but assume your service is directly handling external HTTP traffic, rather than sitting behind load-balanced webservers in a DMZ somewhere separate to your nice safe application server. For example, here and here.
This differs, in that your application is only expected to be handling GRPC. The logic used by the reverse proxy to determine where to send the message is up to you, this library simply sets the standard for what must be passed on - an HTTP method, a procedure name and the JSON payload. Your service must provide a procedure with a name that matches the format MethodnameProcedureName, such as PostLogin or GetUserPhoto.
Installation
go get "github.com/LLKennedy/httpgrpc"
Basic Usage
TODO
Testing
On windows, the simplest way to test is to use the powershell script.
./test.ps1
To emulate the testing which occurs in build pipelines for linux and mac, run the following:
go test ./... -race