bobbae / grpc-rest-go-example

Example of how to setup GRPC and the grpc gateway and run it on the same port

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

grpc-rest-go-example

In this repository we show an example of how to make a service expose both a REST API and a gRPC API on the same port.

This repository belongs together with an article. The focus for this example is to get it to work on the same port.

On the master branch we show an approach using the GRPC-Gateway, a project to auto-generate HTTP endpoints for gRPC protobuf definitions.

On the nogateway branch we show an alternative approach without the auto-code generation, and using CMUX, a way to share a TCP port between different protocols.

About

Example of how to setup GRPC and the grpc gateway and run it on the same port

License:Apache License 2.0


Languages

Language:Go 84.5%Language:Makefile 15.5%