Versions in this module Expand all Collapse all v1 v1.13.0 Sep 13, 2024 Changes in this version + const StateDown + const StateFailing + const StateInvalid + const StateOk + var HopHeaders = []string + func NewBackend(ctx *hclsyntax.Body, tc *Config, opts *BackendOptions, log *logrus.Entry) http.RoundTripper + func NewProbe(log *logrus.Entry, tc *Config, opts *config.HealthCheck, ...) + func NewTransport(conf *Config, log *logrus.Entry) *http.Transport + func ReadCertificates(conf *config.BackendTLS) (tls.Certificate, tls.Certificate, error) + func RemoveConnectionHeaders(h http.Header) + func RemoveHopHeaders(header http.Header) + type Backend struct + func (b *Backend) OnProbeChange(info *HealthInfo) + func (b *Backend) RoundTrip(req *http.Request) (*http.Response, error) + func (b *Backend) Value() cty.Value + type BackendOptions struct + HealthCheck *config.HealthCheck + OpenAPI *validation.OpenAPIOptions + RequestAuthz []RequestAuthorizer + type Config struct + BackendName string + CACertificate tls.Certificate + Certificate []byte + ClientCertificate tls.Certificate + ConnectTimeout time.Duration + Context context.Context + DisableCertValidation bool + DisableConnectionReuse bool + HTTP2 bool + Hostname string + MaxConnections int + NoProxyFromEnv bool + Origin string + Proxy string + RateLimits ratelimit.RateLimits + Scheme string + TTFBTimeout time.Duration + Timeout time.Duration + func (c *Config) WithTarget(scheme, origin, hostname, proxyURL string) *Config + func (c *Config) WithTimings(connect, ttfb, timeout string, logger *logrus.Entry) *Config + type HealthInfo struct + Error string + Healthy bool + Origin string + State string + type OAuth2ReqAuth struct + func (oa *OAuth2ReqAuth) GetToken(req *http.Request) error + func (oa *OAuth2ReqAuth) RetryWithToken(req *http.Request, res *http.Response) (bool, error) + type OriginConn struct + func NewOriginConn(ctx context.Context, conn net.Conn, conf *Config, entry *logrus.Entry) *OriginConn + func (o *OriginConn) Close() error + type Probe struct + func (p Probe) String() string + type ProbeStateChange interface + OnProbeChange func(info *HealthInfo) + type RequestAuthorizer interface + GetToken func(req *http.Request) error + RetryWithToken func(req *http.Request, res *http.Response) (bool, error) + func NewOAuth2ReqAuth(evalCtx *hcl.EvalContext, conf *config.OAuth2ReqAuth, ...) (RequestAuthorizer, error) + func NewTokenRequest(conf *config.TokenRequest, memStore *cache.MemoryStore, ...) (RequestAuthorizer, error) + type TokenRequest struct + func (t *TokenRequest) GetToken(req *http.Request) error + func (t *TokenRequest) RetryWithToken(_ *http.Request, _ *http.Response) (bool, error)