Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
)Errors
Functions ¶
This section is empty.
Types ¶
type H2CTransport ¶ added in v0.9.0
type H2CTransport struct {
// contains filtered or unexported fields
}
H2CTransport type
type HTTPSTransport ¶ added in v0.9.0
type HTTPSTransport struct { DialTimeout time.Duration TCPKeepAlive time.Duration DisableKeepAlives bool MaxConn int MaxIdleConns int IdleConnTimeout time.Duration ResponseHeaderTimeout time.Duration TLSClientConfig *tls.Config // contains filtered or unexported fields }
HTTPSTransport type
type HTTPTransport ¶ added in v0.9.0
type HTTPTransport struct { DialTimeout time.Duration TCPKeepAlive time.Duration DisableKeepAlives bool MaxConn int MaxIdleConns int IdleConnTimeout time.Duration ResponseHeaderTimeout time.Duration // contains filtered or unexported fields }
HTTPTransport type
type RoundRobinLoadBalancer ¶ added in v0.9.0
type RoundRobinLoadBalancer struct { Targets []*Target // contains filtered or unexported fields }
RoundRobinLoadBalancer strategy
func NewRoundRobinLoadBalancer ¶ added in v0.9.0
func NewRoundRobinLoadBalancer(targets []*Target) *RoundRobinLoadBalancer
NewRoundRobinLoadBalancer creates new round-robin load balancer
type Target ¶ added in v0.9.0
type Target struct { Host string Transport http.RoundTripper }
Target is the load balancer target
type UnixTransport ¶ added in v0.9.0
type UnixTransport struct { DisableKeepAlives bool MaxIdleConns int IdleConnTimeout time.Duration ResponseHeaderTimeout time.Duration // contains filtered or unexported fields }
UnixTransport type
type Upstream ¶
type Upstream struct { Transport http.RoundTripper ErrorLog *log.Logger Host string // override host Path string // target prefix path Retries int BackoffFactor time.Duration }
Upstream controls request flow to upstream server via load balancer
func SingleHost ¶ added in v0.2.0
func SingleHost(host string, transport http.RoundTripper) *Upstream
SingleHost creates new single host upstream
Click to show internal directories.
Click to hide internal directories.