static

package
v2.11.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 37 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// DefaultInternalEntryPointName the name of the default internal entry point.
	DefaultInternalEntryPointName = "traefik"

	// DefaultGraceTimeout controls how long Traefik serves pending requests
	// prior to shutting down.
	DefaultGraceTimeout = 10 * time.Second

	// DefaultIdleTimeout before closing an idle connection.
	DefaultIdleTimeout = 180 * time.Second

	// DefaultReadTimeout defines the default maximum duration for reading the entire request, including the body.
	DefaultReadTimeout = 60 * time.Second

	// DefaultAcmeCAServer is the default ACME API endpoint.
	DefaultAcmeCAServer = "https://acme-v02.api.letsencrypt.org/directory"

	// DefaultUDPTimeout defines how long to wait by default on an idle session,
	// before releasing all resources related to that session.
	DefaultUDPTimeout = 3 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Insecure           bool `` /* 160-byte string literal not displayed */
	Dashboard          bool `` /* 128-byte string literal not displayed */
	Debug              bool `` /* 153-byte string literal not displayed */
	DisableDashboardAd bool `` /* 164-byte string literal not displayed */

}

API holds the API configuration.

func (*API) SetDefaults

func (a *API) SetDefaults()

SetDefaults sets the default values.

type CertificateResolver

type CertificateResolver struct {
	ACME *acmeprovider.Configuration `` /* 137-byte string literal not displayed */
}

CertificateResolver contains the configuration for the different types of certificates resolver.

type Configuration

type Configuration struct {
	Global *Global `` /* 128-byte string literal not displayed */

	ServersTransport *ServersTransport `` /* 156-byte string literal not displayed */
	EntryPoints      EntryPoints       `` /* 139-byte string literal not displayed */
	Providers        *Providers        `` /* 133-byte string literal not displayed */

	API     *API           `` /* 149-byte string literal not displayed */
	Metrics *types.Metrics `` /* 129-byte string literal not displayed */
	Ping    *ping.Handler  `` /* 143-byte string literal not displayed */

	Log       *types.TraefikLog `` /* 149-byte string literal not displayed */
	AccessLog *types.AccessLog  `` /* 166-byte string literal not displayed */
	Tracing   *Tracing          `` /* 166-byte string literal not displayed */

	HostResolver *types.HostResolverConfig `` /* 179-byte string literal not displayed */

	CertificatesResolvers map[string]CertificateResolver `` /* 182-byte string literal not displayed */

	// Deprecated.
	Pilot *Pilot `` /* 138-byte string literal not displayed */

	Experimental *Experimental `` /* 140-byte string literal not displayed */
}

Configuration is the static configuration.

func (*Configuration) SetEffectiveConfiguration

func (c *Configuration) SetEffectiveConfiguration()

SetEffectiveConfiguration adds missing configuration parameters derived from existing ones. It also takes care of maintaining backwards compatibility.

func (*Configuration) ValidateConfiguration

func (c *Configuration) ValidateConfiguration() error

ValidateConfiguration validate that configuration is coherent.

type EntryPoint

type EntryPoint struct {
	Address          string                `description:"Entry point address." json:"address,omitempty" toml:"address,omitempty" yaml:"address,omitempty"`
	Transport        *EntryPointsTransport `` /* 162-byte string literal not displayed */
	ProxyProtocol    *ProxyProtocol        `` /* 187-byte string literal not displayed */
	ForwardedHeaders *ForwardedHeaders     `` /* 162-byte string literal not displayed */
	HTTP             HTTPConfig            `description:"HTTP configuration." json:"http,omitempty" toml:"http,omitempty" yaml:"http,omitempty" export:"true"`
	HTTP2            *HTTP2Config          `description:"HTTP/2 configuration." json:"http2,omitempty" toml:"http2,omitempty" yaml:"http2,omitempty" export:"true"`
	HTTP3            *HTTP3Config          `` /* 155-byte string literal not displayed */
	UDP              *UDPConfig            `description:"UDP configuration." json:"udp,omitempty" toml:"udp,omitempty" yaml:"udp,omitempty"`
}

EntryPoint holds the entry point configuration.

func (EntryPoint) GetAddress

func (ep EntryPoint) GetAddress() string

GetAddress strips any potential protocol part of the address field of the entry point, in order to return the actual address.

func (EntryPoint) GetProtocol

func (ep EntryPoint) GetProtocol() (string, error)

GetProtocol returns the protocol part of the address field of the entry point. If none is specified, it defaults to "tcp".

func (*EntryPoint) SetDefaults

func (ep *EntryPoint) SetDefaults()

SetDefaults sets the default values.

type EntryPoints

type EntryPoints map[string]*EntryPoint

EntryPoints holds the HTTP entry point list.

type EntryPointsTransport

type EntryPointsTransport struct {
	LifeCycle            *LifeCycle          `` /* 152-byte string literal not displayed */
	RespondingTimeouts   *RespondingTimeouts `` /* 191-byte string literal not displayed */
	KeepAliveMaxTime     ptypes.Duration     `` /* 186-byte string literal not displayed */
	KeepAliveMaxRequests int                 `` /* 208-byte string literal not displayed */
}

EntryPointsTransport configures communication between clients and Traefik.

func (*EntryPointsTransport) SetDefaults

func (t *EntryPointsTransport) SetDefaults()

SetDefaults sets the default values.

type Experimental

type Experimental struct {
	Plugins      map[string]plugins.Descriptor      `description:"Plugins configuration." json:"plugins,omitempty" toml:"plugins,omitempty" yaml:"plugins,omitempty" export:"true"`
	LocalPlugins map[string]plugins.LocalDescriptor `` /* 146-byte string literal not displayed */

	KubernetesGateway bool `` /* 181-byte string literal not displayed */
	HTTP3             bool `description:"Enable HTTP3." json:"http3,omitempty" toml:"http3,omitempty" yaml:"http3,omitempty" export:"true"`
}

Experimental experimental Traefik features.

type ForwardedHeaders

type ForwardedHeaders struct {
	Insecure   bool     `` /* 134-byte string literal not displayed */
	TrustedIPs []string `` /* 145-byte string literal not displayed */
}

ForwardedHeaders Trust client forwarding headers.

type ForwardingTimeouts

type ForwardingTimeouts struct {
	DialTimeout           ptypes.Duration `` /* 228-byte string literal not displayed */
	ResponseHeaderTimeout ptypes.Duration `` /* 293-byte string literal not displayed */
	IdleConnTimeout       ptypes.Duration `` /* 229-byte string literal not displayed */
}

ForwardingTimeouts contains timeout configurations for forwarding requests to the backend servers.

func (*ForwardingTimeouts) SetDefaults

func (f *ForwardingTimeouts) SetDefaults()

SetDefaults sets the default values.

type Global

type Global struct {
	CheckNewVersion    bool `` /* 218-byte string literal not displayed */
	SendAnonymousUsage bool `` /* 282-byte string literal not displayed */
}

Global holds the global configuration.

type HTTP2Config added in v2.8.0

type HTTP2Config struct {
	MaxConcurrentStreams int32 `` /* 240-byte string literal not displayed */
}

HTTP2Config is the HTTP2 configuration of an entry point.

func (*HTTP2Config) SetDefaults added in v2.8.0

func (c *HTTP2Config) SetDefaults()

SetDefaults sets the default values.

type HTTP3Config added in v2.6.0

type HTTP3Config struct {
	AdvertisedPort int `` /* 176-byte string literal not displayed */
}

HTTP3Config is the HTTP3 configuration of an entry point.

type HTTPConfig

type HTTPConfig struct {
	Redirections          *Redirections `` /* 136-byte string literal not displayed */
	Middlewares           []string      `` /* 177-byte string literal not displayed */
	TLS                   *TLSConfig    `` /* 196-byte string literal not displayed */
	EncodeQuerySemicolons bool          `` /* 193-byte string literal not displayed */
}

HTTPConfig is the HTTP configuration of an entry point.

type LifeCycle

type LifeCycle struct {
	RequestAcceptGraceTimeout ptypes.Duration `` /* 250-byte string literal not displayed */
	GraceTimeOut              ptypes.Duration `` /* 191-byte string literal not displayed */
}

LifeCycle contains configurations relevant to the lifecycle (such as the shutdown phase) of Traefik.

func (*LifeCycle) SetDefaults

func (a *LifeCycle) SetDefaults()

SetDefaults sets the default values.

type Pilot

type Pilot struct {
	Token     string `` /* 133-byte string literal not displayed */
	Dashboard bool   `` /* 146-byte string literal not displayed */
}

Pilot Configuration related to Traefik Pilot. Deprecated.

type PluginConf added in v2.5.0

type PluginConf map[string]interface{}

PluginConf holds the plugin configuration.

type Providers

type Providers struct {
	ProvidersThrottleDuration ptypes.Duration `` /* 356-byte string literal not displayed */

	Docker            *docker.Provider               `` /* 181-byte string literal not displayed */
	File              *file.Provider                 `` /* 136-byte string literal not displayed */
	Marathon          *marathon.Provider             `` /* 189-byte string literal not displayed */
	KubernetesIngress *ingress.Provider              `` /* 218-byte string literal not displayed */
	KubernetesCRD     *crd.Provider                  `` /* 206-byte string literal not displayed */
	KubernetesGateway *gateway.Provider              `` /* 231-byte string literal not displayed */
	Rest              *rest.Provider                 `` /* 173-byte string literal not displayed */
	Rancher           *rancher.Provider              `` /* 185-byte string literal not displayed */
	ConsulCatalog     *consulcatalog.ProviderBuilder `` /* 209-byte string literal not displayed */
	Nomad             *nomad.ProviderBuilder         `` /* 177-byte string literal not displayed */
	Ecs               *ecs.Provider                  `` /* 173-byte string literal not displayed */

	Consul    *consul.ProviderBuilder `` /* 182-byte string literal not displayed */
	Etcd      *etcd.Provider          `` /* 173-byte string literal not displayed */
	ZooKeeper *zk.Provider            `` /* 193-byte string literal not displayed */
	Redis     *redis.Provider         `` /* 177-byte string literal not displayed */
	HTTP      *http.Provider          `` /* 173-byte string literal not displayed */

	Plugin map[string]PluginConf `description:"Plugins configuration." json:"plugin,omitempty" toml:"plugin,omitempty" yaml:"plugin,omitempty"`
}

Providers contains providers configuration.

type ProxyProtocol

type ProxyProtocol struct {
	Insecure   bool     `description:"Trust all." json:"insecure,omitempty" toml:"insecure,omitempty" yaml:"insecure,omitempty" export:"true"`
	TrustedIPs []string `description:"Trust only selected IPs." json:"trustedIPs,omitempty" toml:"trustedIPs,omitempty" yaml:"trustedIPs,omitempty"`
}

ProxyProtocol contains Proxy-Protocol configuration.

type RedirectEntryPoint

type RedirectEntryPoint struct {
	To        string `` /* 128-byte string literal not displayed */
	Scheme    string `` /* 132-byte string literal not displayed */
	Permanent bool   `` /* 141-byte string literal not displayed */
	Priority  int    `` /* 139-byte string literal not displayed */
}

RedirectEntryPoint is the definition of an entry point redirection.

func (*RedirectEntryPoint) SetDefaults

func (r *RedirectEntryPoint) SetDefaults()

SetDefaults sets the default values.

type Redirections

type Redirections struct {
	EntryPoint *RedirectEntryPoint `` /* 150-byte string literal not displayed */
}

Redirections is a set of redirection for an entry point.

type RespondingTimeouts

type RespondingTimeouts struct {
	ReadTimeout  ptypes.Duration `` /* 230-byte string literal not displayed */
	WriteTimeout ptypes.Duration `` /* 224-byte string literal not displayed */
	IdleTimeout  ptypes.Duration `` /* 257-byte string literal not displayed */
}

RespondingTimeouts contains timeout configurations for incoming requests to the Traefik instance.

func (*RespondingTimeouts) SetDefaults

func (a *RespondingTimeouts) SetDefaults()

SetDefaults sets the default values.

type ServersTransport

type ServersTransport struct {
	InsecureSkipVerify  bool                `` /* 173-byte string literal not displayed */
	RootCAs             []tls.FileOrContent `` /* 131-byte string literal not displayed */
	MaxIdleConnsPerHost int                 `` /* 252-byte string literal not displayed */
	ForwardingTimeouts  *ForwardingTimeouts `` /* 191-byte string literal not displayed */
}

ServersTransport options to configure communication between Traefik and the servers.

type TLSConfig

type TLSConfig struct {
	Options      string         `` /* 165-byte string literal not displayed */
	CertResolver string         `` /* 189-byte string literal not displayed */
	Domains      []types.Domain `` /* 165-byte string literal not displayed */
}

TLSConfig is the default TLS configuration for all the routers associated to the concerned entry point.

type Tracing

type Tracing struct {
	ServiceName   string           `` /* 145-byte string literal not displayed */
	SpanNameLimit int              `` /* 191-byte string literal not displayed */
	Jaeger        *jaeger.Config   `` /* 157-byte string literal not displayed */
	Zipkin        *zipkin.Config   `` /* 157-byte string literal not displayed */
	Datadog       *datadog.Config  `` /* 161-byte string literal not displayed */
	Instana       *instana.Config  `` /* 161-byte string literal not displayed */
	Haystack      *haystack.Config `` /* 165-byte string literal not displayed */
	Elastic       *elastic.Config  `` /* 161-byte string literal not displayed */
}

Tracing holds the tracing configuration.

func (*Tracing) SetDefaults

func (t *Tracing) SetDefaults()

SetDefaults sets the default values.

type UDPConfig added in v2.5.0

type UDPConfig struct {
	Timeout ptypes.Duration `` /* 180-byte string literal not displayed */
}

UDPConfig is the UDP configuration of an entry point.

func (*UDPConfig) SetDefaults added in v2.5.0

func (u *UDPConfig) SetDefaults()

SetDefaults sets the default values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL