http

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2019 License: Apache-2.0 Imports: 11 Imported by: 9

Documentation

Overview

Package http provides a micro rpc to http proxy

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProxy

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

NewProxy returns a new proxy which will route using a http client

func NewSingleHostProxy

func NewSingleHostProxy(url string) proxy.Proxy

NewSingleHostProxy returns a router which sends requests to a single http backend

Types

type Proxy

type Proxy struct {
	options.Options

	// The http backend to call
	Endpoint string
	// contains filtered or unexported fields
}

Proxy will proxy rpc requests as http POST requests. It is a server.Proxy

func (*Proxy) ProcessMessage added in v1.17.0

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

ProcessMessage handles incoming asynchronous messages

func (*Proxy) ServeRequest

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

ServeRequest honours the server.Router interface

Jump to

Keyboard shortcuts

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