Skip to content

pjserol/tuto-grpc-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tuto gRPC

Inspired by the course of Stephane Maarek.

  • Unary
  • Server Streaming
  • Client Streaming
  • Bi-Directional Streaming
  • Blog example: CRUD + download image

Documentation

https://grpc.io/

Error Handling

Deadlines

Authentication

Reflection

Command line:

go get github.com/ktr0731/evans

evans -p 50051 -r

show package

show service

show message

desc SumRequest

package calculator

service CalculatorService

call Sum

mongoDB

brew tap mongodb/brew

brew install mongodb-community

brew services start mongodb-community

mkdir database/data/db

mongod --dbpath database/data/db

  • Interface for mongoDB - Robo 3T

https://robomongo.org/download

  • driver

go get go.mongodb.org/mongo-driver/mongo

Real world example

gRPC gateway

https://github.com/grpc-ecosystem/grpc-gateway

gRPC to JSON proxy generator following the gRPC HTTP spec.

GoGo - Alternative of golang/protobuf

Third party with extra performance.

Run blog

  • local

export Environment=local

go run blog/blog_server/*.go

go run blog/blog_client/client.go

evans -p 50051 -r

  • with TLS

export Environment=somethingElse

go run blog/blog_server/*.go

evans -p 50051 -r --tls --host=localhost --cacert ssl/ca.crt

About

Introduction gRPC with Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published