go

command
v0.0.0-...-a649600 Latest Latest
Warning

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

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

README

Go

This Go example uses vanilla net/http and the proxy

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

RPC Example

Run proxy

micro proxy

Run server

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

Run client

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

HTTP Example

Run proxy with proxy handler

micro proxy --handler=http

Run server

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

Run client

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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