From 109b7e5f7e09122be599e500030335972a326bdc Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Wed, 14 Jan 2015 08:38:39 +0000 Subject: [PATCH] update readme --- README.md | 29 +++++++++++++++++++++++++++++ template/README.md | 6 +++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ec5a678f..63140f61 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,32 @@ # Go Micro - a microservices client/server library This a minimalistic step into microservices using HTTP/RPC and protobuf. + +An example server can be found in go-micro/template. + +## Prerequisites + +### Install Consul +[https://www.consul.io/intro/getting-started/install.html](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 go-micro/template/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 +``` diff --git a/template/README.md b/template/README.md index 0262ada7..53614551 100644 --- a/template/README.md +++ b/template/README.md @@ -17,14 +17,14 @@ Run Service $ go run main.go 1416690099281057746 [Debug] Rpc handler /_rpc -1416690099281092588 [Debug] Starting server go.micro.service.go-template id go.micro.service.go-template-c0bfcb44-728a-11e4-b099-68a86d0d36b6 +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.go-template-c0bfcb44-728a-11e4-b099-68a86d0d36b6 +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.go-template-c0bfcb44-728a-11e4-b099-68a86d0d36b6: Hello John +go.micro.service.template-c0bfcb44-728a-11e4-b099-68a86d0d36b6: Hello John ```