- Unary, Server-side Streaming and Client-side Streaming RPCs API
- Bidirectional Streaming RPC
- Example of Go client
- CI with Travis
- Docker Build
Get the micro-rpc repository
go get github.com/goboilerplates/micro-rpc
cd echo $GOPATH/src/github.com/goboilerplates/micro-rpc
And install dependencies
go get -u github.com/golang/dep/cmd/dep
dep ensure
Run all tests
go test ./...
Or run all tests with coverage
bash script/coverage.sh
Run main.go
# Server serves RPC at localhost:50052
go run main.go
# Example of go client requests the server
go run example/goclient/main_client.go
Build and run native binary
bash script/Build.sh
./micro-rpc.outBuild native binary for multiple platforms (darwin, windows and linux)
bash script/BuildMulti.sh
Generate Go Protocol Buffers
protoc proto/main.proto --go_out=plugins=grpc:./
Build docker image
bash script/Dockerbuild.sh
Run docker container
docker run -d --name micro-rpc -p 50052:50052 goboilerplates/micro-rpc
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the MIT License - see the LICENSE file for details