This is an example of sending metadata/headers.
HTTP headers sent to the micro api will be converted to metadata and forwarded on.
- srv - an RPC service which extracts metadata
- cli - an RPC client that calls the service once
Service discovery is required for all services. Default is Consul or MDNS. You can also use plugins from micro/plugins.
Use the flag --registry=mdns
brew install consul
consul agent -dev
Start go.micro.srv.greeter
go run srv/main.go
Call go.micro.srv.greeter via client
go run cli/main.go