module
0.0.0-20200417104214-7760e9567c4d
Repository: https://github.com/devplayg/hello_grpc.git
Documentation: pkg.go.dev
# README
hello_grpc
gRPC's four kinds of service method in Go
gRPC service method | Request | Response | Example |
---|---|---|---|
Unary | Single | Single | Greeting |
Server-side streaming | Single | Stream | File downloading |
Client-side streaming | Stream | Single | File uploading |
Bidirectional streaming | Stream | Stream | Shouting each other |
1. Unary RPC
- Client: Single request
- Server: Single response
2. Server-side streaming RPC
- Client: Single request
- Server: Stream response
3. Client-side streaming RPC
- Client: Stream request
- Server: Single response
4. Bidirectional streaming RPC
- Client: Stream request
- Server: Stream request
Etc.
Appendix 1 - Tracing
Appendix 2 - Secure gRPC with TLS
- Client: Secured ingle request
- Server: Secured single response
Prerequisites
- Download Protocol Buffer and locate it in $GOPATH
- Install
protoc-gen-go
that is a plugin for the Google protocol buffer compiler to generate Go code.
go get -u github.com/golang/protobuf/protoc-gen-go