Skip to content

goboilerplates/micro-rpc

Boilerplate for RPC Microservice in Go

Build Status codecov Go Report Card GoDoc License

Features

  • Unary, Server-side Streaming and Client-side Streaming RPCs API
  • Bidirectional Streaming RPC
  • Example of Go client
  • CI with Travis
  • Docker Build

Installation

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

Running the tests

Run all tests

go test ./...

Or run all tests with coverage

bash script/coverage.sh

Build and Run

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.out

Build 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:./

Docker support

Build docker image

bash script/Dockerbuild.sh

Run docker container

docker run -d --name micro-rpc -p 50052:50052 goboilerplates/micro-rpc

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE file for details

About

Boilerplate for RPC Microservice in Go

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors