consulcatalog

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: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration added in v2.8.0

type Configuration struct {
	Constraints       string          `` /* 256-byte string literal not displayed */
	Endpoint          *EndpointConfig `` /* 130-byte string literal not displayed */
	Prefix            string          `` /* 131-byte string literal not displayed */
	RefreshInterval   ptypes.Duration `` /* 157-byte string literal not displayed */
	RequireConsistent bool            `` /* 172-byte string literal not displayed */
	Stale             bool            `` /* 137-byte string literal not displayed */
	Cache             bool            `` /* 139-byte string literal not displayed */
	ExposedByDefault  bool            `` /* 159-byte string literal not displayed */
	DefaultRule       string          `description:"Default rule." json:"defaultRule,omitempty" toml:"defaultRule,omitempty" yaml:"defaultRule,omitempty"`
	ConnectAware      bool            `` /* 148-byte string literal not displayed */
	ConnectByDefault  bool            `` /* 183-byte string literal not displayed */
	ServiceName       string          `` /* 219-byte string literal not displayed */
	Watch             bool            `description:"Watch Consul API events." json:"watch,omitempty" toml:"watch,omitempty" yaml:"watch,omitempty" export:"true"`
}

Configuration represents the Consul Catalog provider configuration.

func (*Configuration) SetDefaults added in v2.8.0

func (c *Configuration) SetDefaults()

SetDefaults sets the default values.

type EndpointConfig

type EndpointConfig struct {
	Address          string                  `description:"The address of the Consul server" json:"address,omitempty" toml:"address,omitempty" yaml:"address,omitempty"`
	Scheme           string                  `description:"The URI scheme for the Consul server" json:"scheme,omitempty" toml:"scheme,omitempty" yaml:"scheme,omitempty"`
	DataCenter       string                  `` /* 172-byte string literal not displayed */
	Token            string                  `` /* 190-byte string literal not displayed */
	TLS              *types.ClientTLS        `description:"Enable TLS support." json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" export:"true"`
	HTTPAuth         *EndpointHTTPAuthConfig `` /* 138-byte string literal not displayed */
	EndpointWaitTime ptypes.Duration         `` /* 229-byte string literal not displayed */
}

EndpointConfig holds configurations of the endpoint.

type EndpointHTTPAuthConfig

type EndpointHTTPAuthConfig struct {
	Username string `` /* 128-byte string literal not displayed */
	Password string `` /* 128-byte string literal not displayed */
}

EndpointHTTPAuthConfig holds configurations of the authentication.

type Provider

type Provider struct {
	Configuration
	// contains filtered or unexported fields
}

Provider is the Consul Catalog provider implementation.

func (*Provider) Init

func (p *Provider) Init() error

Init the provider.

func (*Provider) Provide

func (p *Provider) Provide(configurationChan chan<- dynamic.Message, pool *safe.Pool) error

Provide allows the consul catalog provider to provide configurations to traefik using the given configuration channel.

type ProviderBuilder added in v2.8.0

type ProviderBuilder struct {
	Configuration `yaml:",inline" export:"true"`

	// Deprecated: use Namespaces option instead.
	Namespace  string   `` /* 165-byte string literal not displayed */
	Namespaces []string `` /* 169-byte string literal not displayed */
}

ProviderBuilder is responsible for constructing namespaced instances of the Consul Catalog provider.

func (*ProviderBuilder) BuildProviders added in v2.8.0

func (p *ProviderBuilder) BuildProviders() []*Provider

BuildProviders builds Consul Catalog provider instances for the given namespaces configuration.

Jump to

Keyboard shortcuts

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