The following gRPC sample project is built in Go and connects to a MongoDB. The project also exposes the services as HTTP. In the examples directory you will see both gRPC and HTTP client samples.
Authored by: Rob Taylor roboncode@gmail.com
go mod download
go mod vendor
go run cmd/example/main.gomake docker
make composemake
./bin/exampleBe sure the service is running using one of the methods above
go run examples/main.goFirst install health checker:
~/go/bin/grpc-health-probe -addr=localhost:8080go test ./...- https://medium.com/@lchenn/generate-grpc-and-protobuf-libraries-with-containers-c15ba4e4f3ad
- https://github.com/grpc/grpc-go/blob/master/examples/helloworld/greeter_client/main.go
- https://grpc.io/docs/quickstart/go/
- https://grpc.io/docs/tutorials/basic/go/
- https://github.com/gogo/protobuf