Versions in this module Expand all Collapse all v2 v2.8.4 Sep 29, 2024 Changes in this version + type AUpstreams struct + DialTimeout kengine.Duration + FallbackDelay kengine.Duration + Name string + Port string + Refresh kengine.Duration + Resolver *UpstreamResolver + Versions *IPVersions + func (AUpstreams) KengineModule() kengine.ModuleInfo + func (au *AUpstreams) Provision(ctx kengine.Context) error + func (au AUpstreams) GetUpstreams(r *http.Request) ([]*Upstream, error) + func (au AUpstreams) String() string + func (u *AUpstreams) UnmarshalKenginefile(d *kenginefile.Dispenser) error + type ActiveHealthChecks struct + Body string + ExpectBody string + ExpectStatus int + Fails int + FollowRedirects bool + Headers http.Header + Interval kengine.Duration + MaxSize int64 + Method string + Passes int + Path string + Port int + Timeout kengine.Duration + URI string + Upstream string + func (a *ActiveHealthChecks) IsEnabled() bool + func (a *ActiveHealthChecks) Provision(ctx kengine.Context, h *Handler) error + type CircuitBreaker interface + OK func() bool + RecordMetric func(statusCode int, latency time.Duration) + type ClientIPHashSelection struct + func (ClientIPHashSelection) KengineModule() kengine.ModuleInfo + func (ClientIPHashSelection) Select(pool UpstreamPool, req *http.Request, _ http.ResponseWriter) *Upstream + func (r *ClientIPHashSelection) UnmarshalKenginefile(d *kenginefile.Dispenser) error + type CookieHashSelection struct + FallbackRaw json.RawMessage + MaxAge kengine.Duration + Name string + Secret string + func (CookieHashSelection) KengineModule() kengine.ModuleInfo + func (s *CookieHashSelection) Provision(ctx kengine.Context) error + func (s *CookieHashSelection) UnmarshalKenginefile(d *kenginefile.Dispenser) error + func (s CookieHashSelection) Select(pool UpstreamPool, req *http.Request, w http.ResponseWriter) *Upstream + type CopyResponseHandler struct + StatusCode kenginehttp.WeakString + func (CopyResponseHandler) KengineModule() kengine.ModuleInfo + func (h *CopyResponseHandler) Provision(ctx kengine.Context) error + func (h *CopyResponseHandler) UnmarshalKenginefile(d *kenginefile.Dispenser) error + func (h CopyResponseHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request, _ kenginehttp.Handler) error + type CopyResponseHeadersHandler struct + Exclude []string + Include []string + func (CopyResponseHeadersHandler) KengineModule() kengine.ModuleInfo + func (h *CopyResponseHeadersHandler) Provision(ctx kengine.Context) error + func (h *CopyResponseHeadersHandler) UnmarshalKenginefile(d *kenginefile.Dispenser) error + func (h *CopyResponseHeadersHandler) Validate() error + func (h CopyResponseHeadersHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request, next kenginehttp.Handler) error + 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) KengineModule() kengine.ModuleInfo + func (FirstSelection) Select(pool UpstreamPool, _ *http.Request, _ http.ResponseWriter) *Upstream + func (r *FirstSelection) UnmarshalKenginefile(d *kenginefile.Dispenser) error + type HTTPTransport struct + Compression *bool + DialTimeout kengine.Duration + ExpectContinueTimeout kengine.Duration + FallbackDelay kengine.Duration + ForwardProxyURL string + KeepAlive *KeepAlive + LocalAddress string + MaxConnsPerHost int + MaxResponseHeaderSize int64 + ProxyProtocol string + ReadBufferSize int + ReadTimeout kengine.Duration + Resolver *UpstreamResolver + ResponseHeaderTimeout kengine.Duration + TLS *TLSConfig + Transport *http.Transport + Versions []string + WriteBufferSize int + WriteTimeout kengine.Duration + func (HTTPTransport) KengineModule() kengine.ModuleInfo + func (h *HTTPTransport) EnableTLS(base *TLSConfig) error + func (h *HTTPTransport) NewTransport(kengineCtx kengine.Context) (*http.Transport, error) + func (h *HTTPTransport) Provision(ctx kengine.Context) error + func (h *HTTPTransport) RoundTrip(req *http.Request) (*http.Response, error) + func (h *HTTPTransport) SetScheme(req *http.Request) + func (h *HTTPTransport) UnmarshalKenginefile(d *kenginefile.Dispenser) error + func (h HTTPTransport) Cleanup() error + func (h HTTPTransport) TLSEnabled() bool + type Handler struct + CB CircuitBreaker + CBRaw json.RawMessage + DynamicUpstreams UpstreamSource + DynamicUpstreamsRaw json.RawMessage + FlushInterval kengine.Duration + HandleResponse []kenginehttp.ResponseHandler + Headers *headers.Handler + HealthChecks *HealthChecks + LoadBalancing *LoadBalancing + RequestBuffers int64 + ResponseBuffers int64 + Rewrite *rewrite.Rewrite + StreamCloseDelay kengine.Duration + StreamTimeout kengine.Duration + Transport http.RoundTripper + TransportRaw json.RawMessage + TrustedProxies []string + Upstreams UpstreamPool + VerboseLogs bool + func (Handler) KengineModule() kengine.ModuleInfo + func (h *Handler) Cleanup() error + func (h *Handler) FinalizeUnmarshalKenginefile(helper httpkenginefile.Helper) error + func (h *Handler) Provision(ctx kengine.Context) error + func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next kenginehttp.Handler) error + func (h *Handler) UnmarshalKenginefile(d *kenginefile.Dispenser) error + type HeaderHashSelection struct + FallbackRaw json.RawMessage + Field string + func (HeaderHashSelection) KengineModule() kengine.ModuleInfo + func (s *HeaderHashSelection) Provision(ctx kengine.Context) error + func (s *HeaderHashSelection) UnmarshalKenginefile(d *kenginefile.Dispenser) error + func (s HeaderHashSelection) Select(pool UpstreamPool, req *http.Request, _ http.ResponseWriter) *Upstream + type HealthChecks struct + Active *ActiveHealthChecks + Passive *PassiveHealthChecks + type Host struct + func (h *Host) Fails() int + func (h *Host) NumRequests() int + type IPHashSelection struct + func (IPHashSelection) KengineModule() kengine.ModuleInfo + func (IPHashSelection) Select(pool UpstreamPool, req *http.Request, _ http.ResponseWriter) *Upstream + func (r *IPHashSelection) UnmarshalKenginefile(d *kenginefile.Dispenser) error + type IPVersions struct + IPv4 *bool + IPv6 *bool + type KeepAlive struct + Enabled *bool + IdleConnTimeout kengine.Duration + MaxIdleConns int + MaxIdleConnsPerHost int + ProbeInterval kengine.Duration + type LeastConnSelection struct + func (LeastConnSelection) KengineModule() kengine.ModuleInfo + func (LeastConnSelection) Select(pool UpstreamPool, _ *http.Request, _ http.ResponseWriter) *Upstream + func (r *LeastConnSelection) UnmarshalKenginefile(d *kenginefile.Dispenser) error + type LoadBalancing struct + Retries int + RetryMatch kenginehttp.MatcherSets + RetryMatchRaw kenginehttp.RawMatcherSets + SelectionPolicy Selector + SelectionPolicyRaw json.RawMessage + TryDuration kengine.Duration + TryInterval kengine.Duration + type MultiUpstreams struct + SourcesRaw []json.RawMessage + func (MultiUpstreams) KengineModule() kengine.ModuleInfo + func (mu *MultiUpstreams) Provision(ctx kengine.Context) error + func (mu MultiUpstreams) GetUpstreams(r *http.Request) ([]*Upstream, error) + func (u *MultiUpstreams) UnmarshalKenginefile(d *kenginefile.Dispenser) error + type PassiveHealthChecks struct + FailDuration kengine.Duration + MaxFails int + UnhealthyLatency kengine.Duration + UnhealthyRequestCount int + UnhealthyStatus []int + type ProxyProtocolInfo struct + AddrPort netip.AddrPort + type QueryHashSelection struct + FallbackRaw json.RawMessage + Key string + func (QueryHashSelection) KengineModule() kengine.ModuleInfo + func (s *QueryHashSelection) Provision(ctx kengine.Context) error + func (s *QueryHashSelection) UnmarshalKenginefile(d *kenginefile.Dispenser) error + func (s QueryHashSelection) Select(pool UpstreamPool, req *http.Request, _ http.ResponseWriter) *Upstream + type RandomChoiceSelection struct + Choose int + func (RandomChoiceSelection) KengineModule() kengine.ModuleInfo + func (r *RandomChoiceSelection) Provision(ctx kengine.Context) error + func (r *RandomChoiceSelection) UnmarshalKenginefile(d *kenginefile.Dispenser) error + func (r RandomChoiceSelection) Select(pool UpstreamPool, _ *http.Request, _ http.ResponseWriter) *Upstream + func (r RandomChoiceSelection) Validate() error + type RandomSelection struct + func (RandomSelection) KengineModule() kengine.ModuleInfo + func (r *RandomSelection) UnmarshalKenginefile(d *kenginefile.Dispenser) error + func (r RandomSelection) Select(pool UpstreamPool, request *http.Request, _ http.ResponseWriter) *Upstream + type RoundRobinSelection struct + func (RoundRobinSelection) KengineModule() kengine.ModuleInfo + func (r *RoundRobinSelection) Select(pool UpstreamPool, _ *http.Request, _ http.ResponseWriter) *Upstream + func (r *RoundRobinSelection) UnmarshalKenginefile(d *kenginefile.Dispenser) error + type SRVUpstreams struct + DialTimeout kengine.Duration + FallbackDelay kengine.Duration + GracePeriod kengine.Duration + Name string + Proto string + Refresh kengine.Duration + Resolver *UpstreamResolver + Service string + func (SRVUpstreams) KengineModule() kengine.ModuleInfo + func (su *SRVUpstreams) Provision(ctx kengine.Context) error + func (su SRVUpstreams) GetUpstreams(r *http.Request) ([]*Upstream, error) + func (su SRVUpstreams) String() string + func (u *SRVUpstreams) UnmarshalKenginefile(d *kenginefile.Dispenser) error + type Selector interface + Select func(UpstreamPool, *http.Request, http.ResponseWriter) *Upstream + type TLSConfig struct + CARaw json.RawMessage + ClientCertificateAutomate string + ClientCertificateFile string + ClientCertificateKeyFile string + Curves []string + ExceptPorts []string + HandshakeTimeout kengine.Duration + InsecureSkipVerify bool + Renegotiation string + RootCAPEMFiles []string + RootCAPool []string + ServerName string + func (t *TLSConfig) MakeTLSClientConfig(ctx kengine.Context) (*tls.Config, error) + type TLSTransport interface + EnableTLS func(base *TLSConfig) error + TLSEnabled func() bool + type URIHashSelection struct + func (URIHashSelection) KengineModule() kengine.ModuleInfo + func (URIHashSelection) Select(pool UpstreamPool, req *http.Request, _ http.ResponseWriter) *Upstream + func (r *URIHashSelection) UnmarshalKenginefile(d *kenginefile.Dispenser) error + type Upstream struct + Dial 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 + type UpstreamResolver struct + Addresses []string + func (u *UpstreamResolver) ParseAddresses() error + type UpstreamSource interface + GetUpstreams func(*http.Request) ([]*Upstream, error) + type WeightedRoundRobinSelection struct + Weights []int + func (WeightedRoundRobinSelection) KengineModule() kengine.ModuleInfo + func (r *WeightedRoundRobinSelection) Provision(ctx kengine.Context) error + func (r *WeightedRoundRobinSelection) Select(pool UpstreamPool, _ *http.Request, _ http.ResponseWriter) *Upstream + func (r *WeightedRoundRobinSelection) UnmarshalKenginefile(d *kenginefile.Dispenser) error Other modules containing this package github.com/khulnasoft/kengine