Switch branches/tags
Nothing to show
Find file History
Latest commit bf3dfa0 Nov 21, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
proto protoc-gen-micro was updated Apr 25, 2018
README.md strip down service readme Nov 21, 2018
main.go protoc-gen-micro was updated Apr 25, 2018



This is an example of creating a micro service.


  • main.go - is the main definition of the service, handler and client
  • proto - contains the protobuf definition of the API


Micro services need a discovery system so they can find each other. Micro uses consul by default but its easily swapped out with etcd, kubernetes, or various other systems. We'll run consul for convenience.

Install consul

brew install consul

Run Consul

consul agent -dev

Run the example

Run the service

go run main.go

Run the client

go run main.go --run_client

And that's all there is to it.