/gogrpc

Demo repository for starting gRPC with Go

Primary LanguageGoApache License 2.0Apache-2.0

GRPC Golang

The main purpose of this project is to get an overview about GRPC and how to use it with Go.

Links

French slides associated to that repo are available here

Setup for Go

It is supposed your environment is ready to compile Go.
To build gRPC you then need the following tools :

  • First install protocol buffer compiler for your distribution.
  • Then install the Go protobuf extension.
  • Finally install gRPC for Go

Live coding steps

Defining protocol

See spirits.proto

Building stub for gRPC

cd protocol
protoc --go_out=plugins=grpc:. ./spirits.proto

Building protobuf marshaller stub

cd protocol
protoc --go_out=. ./spirits.proto

Integration in client and server

See server and client

Testing comparison

See comparison