static

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: MIT Imports: 31 Imported by: 0

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

	// 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 {
	Insecure  bool `` /* 160-byte string literal not displayed */
	Dashboard bool `` /* 128-byte string literal not displayed */
	Debug     bool `` /* 153-byte string literal not displayed */
	// TODO: Re-enable statistics
	// Statistics      *types.Statistics `description:"Enable more detailed statistics." json:"statistics,omitempty" toml:"statistics,omitempty" yaml:"statistics,omitempty" export:"true" label:"allowEmpty"`
	DashboardAssets *assetfs.AssetFS `json:"-" toml:"-" yaml:"-" label:"-"`
}

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           `` /* 131-byte string literal not displayed */
	Metrics *types.Metrics `` /* 129-byte string literal not displayed */
	Ping    *ping.Handler  `description:"Enable ping." json:"ping,omitempty" toml:"ping,omitempty" yaml:"ping,omitempty" label:"allowEmpty" export:"true"`

	Log       *types.TraefikLog `` /* 131-byte string literal not displayed */
	AccessLog *types.AccessLog  `` /* 148-byte string literal not displayed */
	Tracing   *Tracing          `` /* 148-byte string literal not displayed */

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

	CertificatesResolvers map[string]CertificateResolver `` /* 182-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 `` /* 148-byte string literal not displayed */
	ProxyProtocol    *ProxyProtocol        `` /* 155-byte string literal not displayed */
	ForwardedHeaders *ForwardedHeaders     `` /* 148-byte string literal not displayed */
	HTTP             HTTPConfig            `description:"HTTP configuration." json:"http,omitempty" toml:"http,omitempty" yaml:"http,omitempty"`
}

EntryPoint holds the entry point configuration.

func (EntryPoint) GetAddress added in v2.2.0

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 added in v2.2.0

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 */
}

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     `` /* 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           types.Duration `` /* 228-byte string literal not displayed */
	ResponseHeaderTimeout types.Duration `` /* 293-byte string literal not displayed */
	IdleConnTimeout       types.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 `` /* 200-byte string literal not displayed */
	SendAnonymousUsage bool `` /* 263-byte string literal not displayed */
	InsecureSNI        bool `` /* 220-byte string literal not displayed */
}

Global holds the global configuration.

type HTTPConfig added in v2.2.0

type HTTPConfig struct {
	Redirections *Redirections `description:"Set of redirection" json:"redirections,omitempty" toml:"redirections,omitempty" yaml:"redirections,omitempty"`
	Middlewares  []string      `` /* 163-byte string literal not displayed */
	TLS          *TLSConfig    `` /* 164-byte string literal not displayed */
}

HTTPConfig is the HTTP configuration of an entry point.

type LifeCycle

type LifeCycle struct {
	RequestAcceptGraceTimeout types.Duration `` /* 250-byte string literal not displayed */
	GraceTimeOut              types.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 Providers

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

	Docker            *docker.Provider        `` /* 163-byte string literal not displayed */
	File              *file.Provider          `` /* 136-byte string literal not displayed */
	Marathon          *marathon.Provider      `` /* 171-byte string literal not displayed */
	KubernetesIngress *ingress.Provider       `` /* 200-byte string literal not displayed */
	KubernetesCRD     *crd.Provider           `` /* 188-byte string literal not displayed */
	Rest              *rest.Provider          `` /* 155-byte string literal not displayed */
	Rancher           *rancher.Provider       `` /* 167-byte string literal not displayed */
	ConsulCatalog     *consulcatalog.Provider `` /* 158-byte string literal not displayed */

	Consul    *consul.Provider `` /* 163-byte string literal not displayed */
	Etcd      *etcd.Provider   `` /* 155-byte string literal not displayed */
	ZooKeeper *zk.Provider     `` /* 175-byte string literal not displayed */
	Redis     *redis.Provider  `` /* 159-byte string literal not displayed */
}

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 added in v2.2.0

type RedirectEntryPoint struct {
	To        string `description:"Targeted entry point of the redirection." json:"to,omitempty" toml:"to,omitempty" yaml:"to,omitempty"`
	Scheme    string `description:"Scheme used for the redirection." json:"https,omitempty" toml:"https,omitempty" yaml:"https,omitempty"`
	Permanent bool   `` /* 127-byte string literal not displayed */
	Priority  int    `description:"Priority of the generated router." json:"priority,omitempty" toml:"priority,omitempty" yaml:"priority,omitempty"`
}

RedirectEntryPoint is the definition of an entry point redirection.

func (*RedirectEntryPoint) SetDefaults added in v2.2.0

func (r *RedirectEntryPoint) SetDefaults()

SetDefaults sets the default values.

type Redirections added in v2.2.0

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

Redirections is a set of redirection for an entry point.

type RespondingTimeouts

type RespondingTimeouts struct {
	ReadTimeout  types.Duration `` /* 230-byte string literal not displayed */
	WriteTimeout types.Duration `` /* 224-byte string literal not displayed */
	IdleTimeout  types.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 added in v2.2.0

type TLSConfig struct {
	Options      string         `` /* 151-byte string literal not displayed */
	CertResolver string         `` /* 175-byte string literal not displayed */
	Domains      []types.Domain `` /* 151-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   `` /* 139-byte string literal not displayed */
	Zipkin        *zipkin.Config   `` /* 139-byte string literal not displayed */
	Datadog       *datadog.Config  `` /* 143-byte string literal not displayed */
	Instana       *instana.Config  `` /* 143-byte string literal not displayed */
	Haystack      *haystack.Config `` /* 147-byte string literal not displayed */
	Elastic       *elastic.Config  `` /* 143-byte string literal not displayed */
}

Tracing holds the tracing configuration.

func (*Tracing) SetDefaults

func (t *Tracing) SetDefaults()

SetDefaults sets the default values.

Jump to

Keyboard shortcuts

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