upstream

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2016 License: MIT Imports: 20 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
	SecretPath          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       []route
	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