Version: v3.0.0 Latest Latest

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

Go to latest
Published: Oct 16, 2020 License: Apache-2.0 Imports: 12 Imported by: 0



Package grpc is a grpc proxy built for the go-micro/server



This section is empty.


This section is empty.


func NewProxy

func NewProxy(opts ...proxy.Option) proxy.Proxy

NewProxy returns a new proxy which will route based on mucp headers


type Proxy

type Proxy struct {

	// The client to use for outbound requests in the local network
	Client client.Client

	// Endpoint to route all calls to
	Endpoint string
	// contains filtered or unexported fields

Proxy will transparently proxy requests to an endpoint. If no endpoint is specified it will call a service using the client.

func (*Proxy) ProcessMessage

func (p *Proxy) ProcessMessage(ctx context.Context, msg server.Message) error

ProcessMessage acts as a message exchange and forwards messages to ongoing topics TODO: should we look at p.Endpoint and only send to the local endpoint? probably

func (*Proxy) ServeRequest

func (p *Proxy) ServeRequest(ctx context.Context, req server.Request, rsp server.Response) error

ServeRequest honours the server.Router interface

func (*Proxy) String

func (p *Proxy) String() string

Source Files

Jump to

Keyboard shortcuts

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