go

command
v0.0.0-...-e01b0a5 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

README

Go

This Go example uses vanilla net/http and the sidecar

  • sidecar.go: methods to call sidecar
  • rpc_{client,server}.go: RPC client/server
  • http_{client,server}.go: HTTP client/server

RPC Example

Run sidecar

micro sidecar

Run server

# serves Say.Hello
go run rpc_server.go sidecar.go

Run client

# calls go.micro.srv.greeter Say.Hello
go run rpc_client.go sidecar.go

HTTP Example

Run sidecar with proxy handler

micro sidecar --handler=proxy

Run server

# serves /greeter
go run http_server.go sidecar.go

Run client

# calls /greeter
go run http_client.go sidecar.go

Documentation

Overview

+build main1

Jump to

Keyboard shortcuts

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