module
Version:
v0.0.0-...-7760e95
Opens a new window with list of versions in this module.
Published: Apr 17, 2020
License: MIT
Opens a new window with license information.
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
example - Greeting
2. Server-side streaming RPC
- Client: Single request
- Server: Stream response
example - Downloading data
3. Client-side streaming RPC
- Client: Stream request
- Server: Single response
example - Uploading file
4. Bidirectional streaming RPC
- Client: Stream request
- Server: Stream request
example - Shouting each other
Etc.
Appendix 1 - Tracing
example - Trace
Appendix 2 - Secure gRPC with TLS
- Client: Secured ingle request
- Server: Secured single response
example - TLS
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
Directories
¶
download
|
|
|
|
|
|
|
|
greeting
|
|
|
|
|
|
|
|
referee
|
|
|
|
|
|
|
|
tls
|
|
|
|
|
|
|
|
trace
|
|
|
|
|
|
|
|
upload
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.