micro/template
2015-05-23 12:22:23 +01:00
..
handler Rework use of context 2015-05-23 11:53:40 +01:00
proto/example update example to use proto3 2015-05-09 00:42:07 +01:00
Dockerfile First 2015-01-13 23:31:27 +00:00
main.go Fixup import paths 2015-05-05 19:05:06 +01:00
pod.json First 2015-01-13 23:31:27 +00:00
README.md update readme output 2015-05-23 12:22:23 +01:00
service.json First 2015-01-13 23:31:27 +00:00

Template Service

An example Go service running with go-micro

Prerequisites

Install Consul https://www.consul.io/intro/getting-started/install.html

Run Consul

$ consul agent -server -bootstrap-expect 1 -data-dir /tmp/consul

Run Service

$ go run main.go

I0523 12:21:09.506998   77096 server.go:113] Starting server go.micro.service.template id go.micro.service.template-cfc481fc-013d-11e5-bcdc-68a86d0d36b6
I0523 12:21:09.507281   77096 rpc_server.go:112] Listening on [::]:51868
I0523 12:21:09.507329   77096 server.go:95] Registering node: go.micro.service.template-cfc481fc-013d-11e5-bcdc-68a86d0d36b6

Test Service

$ go run go-micro/examples/service_client.go

go.micro.service.template-cfc481fc-013d-11e5-bcdc-68a86d0d36b6: Hello John