Chat GRPC service with client and server side streaming. This code is actually being used in real life project. Tested OK with Android and iOS app.
It comes pre-configured with :
- GRPC (google.golang.org/grpc)
- GRPC OpenTracing (github.com/grpc-ecosystem/grpc-opentracing)
- OpenTracing for Go (github.com/opentracing/opentracing-go)
- Viper (github.com/spf13/viper)
- Jaeger (github.com/uber/jaeger-client-go)
Use this command to install the blueprint
go get github.com/rifqiakrm/chat-grpc-go
Use this command to generate protocol buffer manually :
protoc -I $GOPATH/src --go_out=$GOPATH/src $GOPATH/src/github.com/rifqiakrm/{project_name}/proto/{proto_dir}/{your_proto}.proto
protoc -I $GOPATH/src --go-grpc_out=$GOPATH/src $GOPATH/src/github.com/rifqiakrm/{project_name}/proto/{proto_dir}/{your_proto}.proto
or you can do a simple command like ./generate.sh
, but make sure that generate.sh
is an executable file. If you faced an error while executing the file try to run chmod +x generate.sh
then run ./generate.sh
again.
Simply run go run main.go
and the server will be up in no time!
To run as a client you need to run
go run client/example_client.go -sender rifqiakrm -room default
This repository is inspired by Dipesh Dulal's github repo. Please check him out!