micro/examples/service
2016-12-08 12:34:02 +00:00
..
proto Update top level init 2016-01-01 01:16:21 +00:00
wrapper Add the ability to switch out client/server 2016-11-18 17:29:26 +00:00
main.go Add the ability to switch out client/server 2016-11-18 17:29:26 +00:00
README.md update service example readme 2016-12-08 12:34:02 +00:00

Service

This is an example of creating a micro service.

Prereqs

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

Alternative instructions - https://www.consul.io/intro/getting-started/install.html

Run Consul

consul agent -dev -advertise=127.0.0.1

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.