upstream

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2016 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultBackend = helper.URLMustParse("http://localhost:8080")
)

Functions

func NotFoundUnless

func NotFoundUnless(pass bool, handler http.Handler) http.Handler

Types

type Config added in v0.8.3

type Config struct {
	Backend             *url.URL
	Version             string
	DocumentRoot        string
	DevelopmentMode     bool
	Socket              string
	ProxyHeadersTimeout time.Duration
	APILimit            uint
	APIQueueLimit       uint
	APIQueueTimeout     time.Duration
}

type Upstream

type Upstream struct {
	Config
	URLPrefix    urlprefix.Prefix
	Routes       []routeEntry
	RoundTripper *badgateway.RoundTripper
}

func NewUpstream

func NewUpstream(config Config) *Upstream

func (*Upstream) ServeHTTP

func (u *Upstream) ServeHTTP(ow http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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