upstream

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: MIT Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Upstream

type Upstream struct {
	Transport http.RoundTripper
	ErrorLog  *log.Logger
	Host      string // override host
	Path      string // target prefix path
}

Upstream controls request flow to upstream server via load balancer

func New

func New(transport http.RoundTripper) *Upstream

New creates new upstream

func SingleHost added in v0.2.0

func SingleHost(host string, transport http.RoundTripper) *Upstream

SingleHost creates new single host upstream

func (Upstream) ServeHandler

func (m Upstream) ServeHandler(h http.Handler) http.Handler

ServeHandler implements middleware interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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