metadata/

directory
v0.0.0-...-2897420 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2018 License: Apache-2.0

README

Metadata

This is an example of sending metadata/headers.

HTTP headers sent to the micro api will be converted to metadata and forwarded on.

Contents

  • srv - an RPC service which extracts metadata
  • cli - an RPC client that calls the service once

Deps

Service discovery is required for all services. Default is Consul or MDNS. You can also use plugins from micro/plugins.

MDNS

Use the flag --registry=mdns

Consul
brew install consul
consul agent -dev

Run Service

Start go.micro.srv.greeter

go run srv/main.go

Client

Call go.micro.srv.greeter via client

go run cli/main.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL