Documentation
¶
Index ¶
Constants ¶
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 // DefaultAcmeCAServer is the default ACME API endpoint DefaultAcmeCAServer = "https://acme-v02.api.letsencrypt.org/directory" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
EntryPoint string `description:"The entry point that the API handler will be bound to." export:"true"`
Dashboard bool `description:"Activate dashboard." export:"true"`
Debug bool `description:"Enable additional endpoints for debugging and profiling." export:"true"`
Statistics *types.Statistics `description:"Enable more detailed statistics." export:"true" label:"allowEmpty"`
Middlewares []string `description:"Middleware list." export:"true"`
DashboardAssets *assetfs.AssetFS `json:"-" label:"-"`
}
API holds the API configuration
type Configuration ¶
type Configuration struct {
Global *Global `description:"Global configuration options" export:"true"`
ServersTransport *ServersTransport `description:"Servers default transport." export:"true"`
EntryPoints EntryPoints `description:"Entry points definition." export:"true"`
Providers *Providers `description:"Providers configuration." export:"true"`
API *API `description:"Enable api/dashboard." export:"true" label:"allowEmpty"`
Metrics *types.Metrics `description:"Enable a metrics exporter." export:"true"`
Ping *ping.Handler `description:"Enable ping." export:"true" label:"allowEmpty"`
Log *types.TraefikLog `description:"Traefik log settings." export:"true" label:"allowEmpty"`
AccessLog *types.AccessLog `description:"Access log settings." export:"true" label:"allowEmpty"`
Tracing *Tracing `description:"OpenTracing configuration." export:"true" label:"allowEmpty"`
HostResolver *types.HostResolverConfig `description:"Enable CNAME Flattening." export:"true" label:"allowEmpty"`
ACME *acmeprovider.Configuration `description:"Enable ACME (Let's Encrypt): automatic SSL." export:"true"`
}
Configuration is the static configuration
func (*Configuration) InitACMEProvider ¶
func (c *Configuration) InitACMEProvider() (*acmeprovider.Provider, error)
InitACMEProvider create an acme provider from the ACME part of globalConfiguration
func (*Configuration) SetEffectiveConfiguration ¶
func (c *Configuration) SetEffectiveConfiguration(configFile string)
SetEffectiveConfiguration adds missing configuration parameters derived from existing ones. It also takes care of maintaining backwards compatibility.
func (*Configuration) ValidateConfiguration ¶
func (c *Configuration) ValidateConfiguration()
ValidateConfiguration validate that configuration is coherent
type EntryPoint ¶
type EntryPoint struct {
Address string `description:"Entry point address."`
Transport *EntryPointsTransport `description:"Configures communication between clients and Traefik."`
ProxyProtocol *ProxyProtocol `description:"Proxy-Protocol configuration." label:"allowEmpty"`
ForwardedHeaders *ForwardedHeaders `description:"Trust client forwarding headers."`
}
EntryPoint holds the entry point configuration.
func (*EntryPoint) SetDefaults ¶
func (e *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 `description:"Timeouts influencing the server life cycle." export:"true"`
RespondingTimeouts *RespondingTimeouts `description:"Timeouts for incoming requests to the Traefik instance." export:"true"`
}
EntryPointsTransport configures communication between clients and Traefik.
func (*EntryPointsTransport) SetDefaults ¶
func (t *EntryPointsTransport) SetDefaults()
SetDefaults sets the default values.
type ForwardedHeaders ¶
type ForwardedHeaders struct {
Insecure bool `description:"Trust all forwarded headers." export:"true"`
TrustedIPs []string `description:"Trust only forwarded headers from selected IPs."`
}
ForwardedHeaders Trust client forwarding headers.
type ForwardingTimeouts ¶
type ForwardingTimeouts struct {
DialTimeout types.Duration `` /* 141-byte string literal not displayed */
ResponseHeaderTimeout types.Duration `` /* 176-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 `description:"Periodically check if a new version has been released." export:"true"`
SendAnonymousUsage *bool `` /* 136-byte string literal not displayed */
}
Global holds the global configuration.
type LifeCycle ¶
type LifeCycle struct {
RequestAcceptGraceTimeout types.Duration `description:"Duration to keep accepting requests before Traefik initiates the graceful shutdown procedure."`
GraceTimeOut types.Duration `description:"Duration to give active requests a chance to finish before Traefik stops."`
}
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 Providers ¶
type Providers struct {
ProvidersThrottleDuration types.Duration `` /* 227-byte string literal not displayed */
Docker *docker.Provider `description:"Enable Docker backend with default settings." export:"true" label:"allowEmpty"`
File *file.Provider `description:"Enable File backend with default settings." export:"true" label:"allowEmpty"`
Marathon *marathon.Provider `description:"Enable Marathon backend with default settings." export:"true" label:"allowEmpty"`
Kubernetes *ingress.Provider `description:"Enable Kubernetes backend with default settings." export:"true" label:"allowEmpty"`
KubernetesCRD *crd.Provider `description:"Enable Kubernetes backend with default settings." export:"true" label:"allowEmpty"`
Rest *rest.Provider `description:"Enable Rest backend with default settings." export:"true" label:"allowEmpty"`
Rancher *rancher.Provider `description:"Enable Rancher backend with default settings." export:"true" label:"allowEmpty"`
}
Providers contains providers configuration
type ProxyProtocol ¶
type ProxyProtocol struct {
Insecure bool `description:"Trust all." export:"true"`
TrustedIPs []string `description:"Trust only selected IPs."`
}
ProxyProtocol contains Proxy-Protocol configuration.
type RespondingTimeouts ¶
type RespondingTimeouts struct {
ReadTimeout types.Duration `` /* 143-byte string literal not displayed */
WriteTimeout types.Duration `` /* 134-byte string literal not displayed */
IdleTimeout types.Duration `` /* 170-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 `description:"Disable SSL certificate verification." export:"true"`
RootCAs []tls.FileOrContent `description:"Add cert file for self-signed certificate."`
MaxIdleConnsPerHost int `` /* 141-byte string literal not displayed */
ForwardingTimeouts *ForwardingTimeouts `description:"Timeouts for requests forwarded to the backend servers." export:"true"`
}
ServersTransport options to configure communication between Traefik and the servers
type Tracing ¶
type Tracing struct {
Backend string `description:"Selects the tracking backend ('jaeger','zipkin','datadog','instana')." export:"true"`
ServiceName string `description:"Set the name for this service." export:"true"`
SpanNameLimit int `description:"Set the maximum character limit for Span names (default 0 = no limit)." export:"true"`
Jaeger *jaeger.Config `description:"Settings for jaeger." label:"allowEmpty"`
Zipkin *zipkin.Config `description:"Settings for zipkin." label:"allowEmpty"`
DataDog *datadog.Config `description:"Settings for DataDog." label:"allowEmpty"`
Instana *instana.Config `description:"Settings for Instana." label:"allowEmpty"`
Haystack *haystack.Config `description:"Settings for Haystack." label:"allowEmpty"`
}
Tracing holds the tracing configuration.