Versions in this module Expand all Collapse all v2 v2.1.4 Aug 27, 2020 v2.1.3 Aug 20, 2020 v2.1.2 Aug 20, 2020 Changes in this version + type ActiveHealthChecks struct + ExpectBody string + ExpectStatus int + Headers http.Header + Interval caddy.Duration + MaxSize int64 + Path string + Port int + Timeout caddy.Duration + type CircuitBreaker interface + OK func() bool + RecordMetric func(statusCode int, latency time.Duration) + type DialError struct + type DialInfo struct + Address string + Host string + Network string + Port string + Upstream *Upstream + func GetDialInfo(ctx context.Context) (DialInfo, bool) + func (di DialInfo) String() string + type FirstSelection struct + func (FirstSelection) CaddyModule() caddy.ModuleInfo + func (FirstSelection) Select(pool UpstreamPool, _ *http.Request) *Upstream + func (r *FirstSelection) UnmarshalCaddyfile(d *caddyfile.Dispenser) error + type HTTPTransport struct + Compression *bool + DialTimeout caddy.Duration + ExpectContinueTimeout caddy.Duration + FallbackDelay caddy.Duration + KeepAlive *KeepAlive + MaxConnsPerHost int + MaxResponseHeaderSize int64 + ReadBufferSize int + ResponseHeaderTimeout caddy.Duration + TLS *TLSConfig + Transport *http.Transport + Versions []string + WriteBufferSize int + func (HTTPTransport) CaddyModule() caddy.ModuleInfo + func (h *HTTPTransport) EnableTLS(base *TLSConfig) error + func (h *HTTPTransport) NewTransport(ctx caddy.Context) (*http.Transport, error) + func (h *HTTPTransport) Provision(ctx caddy.Context) error + func (h *HTTPTransport) RoundTrip(req *http.Request) (*http.Response, error) + func (h *HTTPTransport) SetScheme(req *http.Request) + func (h *HTTPTransport) UnmarshalCaddyfile(d *caddyfile.Dispenser) error + func (h HTTPTransport) Cleanup() error + func (h HTTPTransport) TLSEnabled() bool + type Handler struct + BufferRequests bool + CB CircuitBreaker + CBRaw json.RawMessage + FlushInterval caddy.Duration + HandleResponse []caddyhttp.ResponseHandler + Headers *headers.Handler + HealthChecks *HealthChecks + LoadBalancing *LoadBalancing + Transport http.RoundTripper + TransportRaw json.RawMessage + Upstreams UpstreamPool + func (Handler) CaddyModule() caddy.ModuleInfo + func (h *Handler) Cleanup() error + func (h *Handler) Provision(ctx caddy.Context) error + func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error + func (h *Handler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error + type HeaderHashSelection struct + Field string + func (HeaderHashSelection) CaddyModule() caddy.ModuleInfo + func (s *HeaderHashSelection) UnmarshalCaddyfile(d *caddyfile.Dispenser) error + func (s HeaderHashSelection) Select(pool UpstreamPool, req *http.Request) *Upstream + type HealthChecks struct + Active *ActiveHealthChecks + Passive *PassiveHealthChecks + type Host interface + CountFail func(int) error + CountRequest func(int) error + Fails func() int + NumRequests func() int + SetHealthy func(bool) (bool, error) + Unhealthy func() bool + type IPHashSelection struct + func (IPHashSelection) CaddyModule() caddy.ModuleInfo + func (IPHashSelection) Select(pool UpstreamPool, req *http.Request) *Upstream + func (r *IPHashSelection) UnmarshalCaddyfile(d *caddyfile.Dispenser) error + type KeepAlive struct + Enabled *bool + IdleConnTimeout caddy.Duration + MaxIdleConns int + MaxIdleConnsPerHost int + ProbeInterval caddy.Duration + type LeastConnSelection struct + func (LeastConnSelection) CaddyModule() caddy.ModuleInfo + func (LeastConnSelection) Select(pool UpstreamPool, _ *http.Request) *Upstream + func (r *LeastConnSelection) UnmarshalCaddyfile(d *caddyfile.Dispenser) error + type LoadBalancing struct + RetryMatch caddyhttp.MatcherSets + RetryMatchRaw caddyhttp.RawMatcherSets + SelectionPolicy Selector + SelectionPolicyRaw json.RawMessage + TryDuration caddy.Duration + TryInterval caddy.Duration + type PassiveHealthChecks struct + FailDuration caddy.Duration + MaxFails int + UnhealthyLatency caddy.Duration + UnhealthyRequestCount int + UnhealthyStatus []int + type RandomChoiceSelection struct + Choose int + func (RandomChoiceSelection) CaddyModule() caddy.ModuleInfo + func (r *RandomChoiceSelection) Provision(ctx caddy.Context) error + func (r *RandomChoiceSelection) UnmarshalCaddyfile(d *caddyfile.Dispenser) error + func (r RandomChoiceSelection) Select(pool UpstreamPool, _ *http.Request) *Upstream + func (r RandomChoiceSelection) Validate() error + type RandomSelection struct + func (RandomSelection) CaddyModule() caddy.ModuleInfo + func (r *RandomSelection) UnmarshalCaddyfile(d *caddyfile.Dispenser) error + func (r RandomSelection) Select(pool UpstreamPool, request *http.Request) *Upstream + type RoundRobinSelection struct + func (RoundRobinSelection) CaddyModule() caddy.ModuleInfo + func (r *RoundRobinSelection) Select(pool UpstreamPool, _ *http.Request) *Upstream + func (r *RoundRobinSelection) UnmarshalCaddyfile(d *caddyfile.Dispenser) error + type Selector interface + Select func(UpstreamPool, *http.Request) *Upstream + type TLSConfig struct + ClientCertificateAutomate string + ClientCertificateFile string + ClientCertificateKeyFile string + HandshakeTimeout caddy.Duration + InsecureSkipVerify bool + RootCAPEMFiles []string + RootCAPool []string + ServerName string + func (t TLSConfig) MakeTLSClientConfig(ctx caddy.Context) (*tls.Config, error) + type TLSTransport interface + EnableTLS func(base *TLSConfig) error + TLSEnabled func() bool + type URIHashSelection struct + func (URIHashSelection) CaddyModule() caddy.ModuleInfo + func (URIHashSelection) Select(pool UpstreamPool, req *http.Request) *Upstream + func (r *URIHashSelection) UnmarshalCaddyfile(d *caddyfile.Dispenser) error + type Upstream struct + Dial string + LookupSRV string + MaxRequests int + func (u *Upstream) Available() bool + func (u *Upstream) Full() bool + func (u *Upstream) Healthy() bool + func (u Upstream) String() string + type UpstreamPool []*Upstream