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 { HTTP2Transport *http2.Transport HTTPTransport *http.Transport // 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 ExpectContinueTimeout 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 ExpectContinueTimeout 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 { Transport http.RoundTripper Host string }
Target is the load balancer target
type Transport ¶ added in v0.12.3
type Transport struct { DialTimeout time.Duration TCPKeepAlive time.Duration DisableKeepAlives bool MaxConn int MaxIdleConns int IdleConnTimeout time.Duration ExpectContinueTimeout time.Duration ResponseHeaderTimeout time.Duration DisableCompression bool TLSClientConfig *tls.Config // contains filtered or unexported fields }
Transport does RoundTrip dynamically from request's scheme
type UnixTransport ¶ added in v0.9.0
type UnixTransport struct { DisableKeepAlives bool MaxIdleConns int IdleConnTimeout time.Duration ExpectContinueTimeout 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.