static

package
v2.0.0-alpha2+incompat... Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 23 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 {
	EntryPoint      string            `description:"EntryPoint" export:"true"`
	Dashboard       bool              `description:"Activate dashboard" export:"true"`
	Statistics      *types.Statistics `description:"Enable more detailed statistics" export:"true"`
	Middlewares     []string          `description:"Middleware list" export:"true"`
	DashboardAssets *assetfs.AssetFS  `json:"-"`
}

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       `` /* 245-byte string literal not displayed */
	Providers        *Providers        `description:"Providers configuration" export:"true"`

	API     *API           `description:"Enable api/dashboard" export:"true"`
	Metrics *types.Metrics `description:"Enable a metrics exporter" export:"true"`
	Ping    *ping.Handler  `description:"Enable ping" export:"true"`

	Log       *types.TraefikLog `description:"Traefik log settings" export:"true"`
	AccessLog *types.AccessLog  `description:"Access log settings" export:"true"`
	Tracing   *Tracing          `description:"OpenTracing configuration" export:"true"`

	HostResolver *types.HostResolverConfig `description:"Enable CNAME Flattening" export:"true"`

	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
	Transport        *EntryPointsTransport
	ProxyProtocol    *ProxyProtocol
	ForwardedHeaders *ForwardedHeaders
}

EntryPoint holds the entry point configuration.

type EntryPoints

type EntryPoints map[string]*EntryPoint

EntryPoints holds the HTTP entry point list.

func (*EntryPoints) Get

func (ep *EntryPoints) Get() interface{}

Get return the EntryPoints map.

func (*EntryPoints) Set

func (ep *EntryPoints) Set(value string) error

Set is the method to set the flag value, part of the flag.Value interface. Set's argument is a string to be parsed to set the flag. It's a comma-separated list, so we split it.

func (*EntryPoints) SetValue

func (ep *EntryPoints) SetValue(val interface{})

SetValue sets the EntryPoints map with val.

func (EntryPoints) String

func (ep EntryPoints) String() string

String is the method to format the flag's value, part of the flag.Value interface. The String method's output will be used in diagnostics.

func (*EntryPoints) Type

func (ep *EntryPoints) Type() string

Type is type of the struct.

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.

type ForwardedHeaders

type ForwardedHeaders struct {
	Insecure   bool
	TrustedIPs []string
}

ForwardedHeaders Trust client forwarding headers.

type ForwardingTimeouts

type ForwardingTimeouts struct {
	DialTimeout           parse.Duration `` /* 164-byte string literal not displayed */
	ResponseHeaderTimeout parse.Duration `` /* 175-byte string literal not displayed */
}

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

type Global

type Global struct {
	Debug              bool  `short:"d" description:"Enable debug mode" export:"true"`
	CheckNewVersion    bool  `description:"Periodically check if a new version has been released" export:"true"`
	SendAnonymousUsage *bool `description:"send periodically anonymous usage statistics" export:"true"`
}

Global holds the global configuration.

type LifeCycle

type LifeCycle struct {
	RequestAcceptGraceTimeout parse.Duration `description:"Duration to keep accepting requests before Traefik initiates the graceful shutdown procedure"`
	GraceTimeOut              parse.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.

type Providers

type Providers struct {
	ProvidersThrottleDuration parse.Duration     `` /* 227-byte string literal not displayed */
	Docker                    *docker.Provider   `description:"Enable Docker backend with default settings" export:"true"`
	File                      *file.Provider     `description:"Enable File backend with default settings" export:"true"`
	Marathon                  *marathon.Provider `description:"Enable Marathon backend with default settings" export:"true"`
	Kubernetes                *ingress.Provider  `description:"Enable Kubernetes backend with default settings" export:"true"`
	KubernetesCRD             *crd.Provider      `description:"Enable Kubernetes backend with default settings" export:"true"`
	Rest                      *rest.Provider     `description:"Enable Rest backend with default settings" export:"true"`
}

Providers contains providers configuration

type ProxyProtocol

type ProxyProtocol struct {
	Insecure   bool `export:"true"`
	TrustedIPs []string
}

ProxyProtocol contains Proxy-Protocol configuration.

type RespondingTimeouts

type RespondingTimeouts struct {
	ReadTimeout  parse.Duration `` /* 142-byte string literal not displayed */
	WriteTimeout parse.Duration `` /* 133-byte string literal not displayed */
	IdleTimeout  parse.Duration `` /* 194-byte string literal not displayed */
}

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

type ServersTransport

type ServersTransport struct {
	InsecureSkipVerify  bool                `description:"Disable SSL certificate verification" export:"true"`
	RootCAs             tls.FilesOrContents `description:"Add cert file for self-signed certificate"`
	MaxIdleConnsPerHost int                 `` /* 142-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"`
	Zipkin        *zipkin.Config  `description:"Settings for zipkin"`
	DataDog       *datadog.Config `description:"Settings for DataDog"`
	Instana       *instana.Config `description:"Settings for Instana"`
}

Tracing holds the tracing configuration.

Jump to

Keyboard shortcuts

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