目录

Micro

1 Overview

2 Install

 #command 
 gopm  get -v  github.com/micro/micro
 go build -o micro main.go
 
 cp micro $GOPATH/bin
 micro 
brew install protobuf
go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
go get -u github.com/micro/protoc-gen-micro
 
 
 #docker
 docker pull microhq/micro
 docker run -p 8080:8080  -e MICRO_REGISTRY=mdns microhq/micro api --handler=rpc --address=:8080 --namespace=shippy

3 Example Usage

./micro cli

-w515

3.1 list service

./micro list services
go.micro.api

3.2 Get Service

./micro get  service go.micro.api

-w1073

3.3 call Service

micro call go.micro.srv.example Example.Call '{"name": "John"}'

3.4 Service Health

./micro health go.micro.api

-w661