Versions in this module Expand all Collapse all v0 v0.9.5 Jan 24, 2017 Changes in this version + func RegisterPolicy(name string, policy func() Policy) + type HostPool []*UpstreamHost + type IPHash struct + func (r *IPHash) Select(pool HostPool, request *http.Request) *UpstreamHost + type LeastConn struct + func (r *LeastConn) Select(pool HostPool, request *http.Request) *UpstreamHost + type Policy interface + Select func(pool HostPool, r *http.Request) *UpstreamHost + type Proxy struct + Next httpserver.Handler + Upstreams []Upstream + func (p Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) + type Random struct + func (r *Random) Select(pool HostPool, request *http.Request) *UpstreamHost + type ReverseProxy struct + Director func(*http.Request) + FlushInterval time.Duration + Transport http.RoundTripper + func NewSingleHostReverseProxy(target *url.URL, without string, keepalive int) *ReverseProxy + func (rp *ReverseProxy) ServeHTTP(rw http.ResponseWriter, outreq *http.Request, respUpdateFn respUpdateFn) error + func (rp *ReverseProxy) UseInsecureTransport() + type RoundRobin struct + func (r *RoundRobin) Select(pool HostPool, request *http.Request) *UpstreamHost + type Upstream interface + AllowedPath func(string) bool + From func() string + GetHostCount func() int + GetTryDuration func() time.Duration + GetTryInterval func() time.Duration + Select func(*http.Request) *UpstreamHost + func NewStaticUpstreams(c caddyfile.Dispenser) ([]Upstream, error) + type UpstreamHost struct + CheckDown UpstreamHostDownFunc + Conns int64 + DownstreamHeaders http.Header + FailTimeout time.Duration + Fails int32 + MaxConns int64 + Name string + ReverseProxy *ReverseProxy + Unhealthy bool + UpstreamHeaders http.Header + WithoutPathPrefix string + func (uh *UpstreamHost) Available() bool + func (uh *UpstreamHost) Down() bool + func (uh *UpstreamHost) Full() bool + type UpstreamHostDownFunc func(*UpstreamHost) bool