Home

Awesome

Micro Examples Travis CI Go Report Card

This is a repository for micro examples. Feel free to contribute.

i18n

中文版本

Contents

Most likely needed examples

Other

Community

Find contributions from the community via the explorer

Dependencies

Service Discovery

All services require service discovery. The default is multicast DNS, a zeroconf system.

If you need something multi-host or more resilient use consul.

Consul

# install
brew install consul

# run
consul agent -dev

Use flag --registry=consul to enable the consul registry.

Protobuf

Protobuf is used for code generation of message types and client/hander stubs.

If making changes recompile the protos.

Install

Install protoc for your environment. Then:

go get github.com/golang/protobuf/{proto,protoc-gen-go}
go get github.com/micro/protoc-gen-micro

Compile Proto

protoc --proto_path=$GOPATH/src:. --micro_out=. --go_out=. path/to/proto