Categorygithub.com/devplayg/hello_grpc
module
0.0.0-20200417104214-7760e9567c4d
Repository: https://github.com/devplayg/hello_grpc.git
Documentation: pkg.go.dev

# README

hello_grpc

grpc.png

gRPC's four kinds of service method in Go

4 kinds of service method

gRPC service methodRequestResponseExample
UnarySingleSingleGreeting
Server-side streamingSingleStreamFile downloading
Client-side streamingStreamSingleFile uploading
Bidirectional streamingStreamStreamShouting 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

  1. Download Protocol Buffer and locate it in $GOPATH
  2. 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

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author