A protoc code generator that creates stub wrappers to directly connect grpc http gateway code to GRPC services.
The grpc-gateway creates a JSON HTTP server that wraps a GRPC based service. It acts as a reverse proxy and connects using a GRPC client to a second GRPC based port. This means that the user request via HTTP is:
- received as JSON
- Is deserialized to native GO structure
- Passed to GRPC client
- Serialized using protobuf
- Send over network GRPC port
- Deserialized from protobuf to native GO structure
- Passed to server function
protoc-gen-grpc-rest-direct
skips most of that process by building a direct
client/server connection stub, to that the grpc-gateway HTTP server can directly
call the GRPC server methods, without going through the additional
serialize/network/deserialize steps.
- Doesn't map Streaming Input/Output (but neither does GRPC Gateway)
- Limited server options (has unary/stream interceptors)