Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
cmd
 
 
 
 
 
 
 
 
 
 
 
 
 
 

A little gRPC demo in Go

Running the Servers

LISTEN=:8091 go run cmd/hello-server1/main.go

and

LISTEN=:8092 go run cmd/hello-server2/main.go

Running the Clients

SERVER=:8091 go run cmd/hello-client1/main.go

and

SERVER=:8092 go run cmd/hello-client2/main.go

and

SERVERS=:8091,:8092 go run cmd/hello-client-lb/main.go

How to compile proto files

The compiled go files are checked in, but if you need to recompile them.

You need to have the proto compiler (protoc) installed with the go plugins

Then, from the pkg directory:

protoc --go_out=plugins=grpc,paths=source_relative:. grpc-hello/v1/grpc-hello.proto

and for the v2

protoc --go_out=plugins=grpc,paths=source_relative:. grpc-hello/v2/grpc-hello.proto

Other Links

About

A little grpc demo in go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published