1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-24 08:02:32 +02:00
go-micro/template
2015-02-14 23:33:21 +00:00
..
handler Move from seelog to glog 2015-01-31 16:49:21 +01:00
proto/example update compiled proto 2015-01-14 10:50:54 +00:00
Dockerfile First 2015-01-13 23:31:27 +00:00
main.go Remove flags from server package. Create cmd package to parse flags and cli usage 2015-02-14 23:33:21 +00:00
pod.json First 2015-01-13 23:31:27 +00:00
README.md update readme 2015-01-14 08:38:39 +00: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

1416690099281057746 [Debug] Rpc handler /_rpc
1416690099281092588 [Debug] Starting server go.micro.service.template id go.micro.service.template-c0bfcb44-728a-11e4-b099-68a86d0d36b6
1416690099281192941 [Debug] Listening on [::]:58264
1416690099281215346 [Debug] Registering go.micro.service.template-c0bfcb44-728a-11e4-b099-68a86d0d36b6

Test Service

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

go.micro.service.template-c0bfcb44-728a-11e4-b099-68a86d0d36b6: Hello John