nomad

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	DefaultRule        string          `description:"Default rule." json:"defaultRule,omitempty" toml:"defaultRule,omitempty" yaml:"defaultRule,omitempty"`
	Constraints        string          `` /* 255-byte string literal not displayed */
	Endpoint           *EndpointConfig `` /* 129-byte string literal not displayed */
	Prefix             string          `` /* 130-byte string literal not displayed */
	Stale              bool            `` /* 137-byte string literal not displayed */
	ExposedByDefault   bool            `` /* 163-byte string literal not displayed */
	RefreshInterval    ptypes.Duration `` /* 158-byte string literal not displayed */
	AllowEmptyServices bool            `` /* 185-byte string literal not displayed */
}

Configuration represents the Nomad provider configuration.

func (*Configuration) SetDefaults

func (c *Configuration) SetDefaults()

SetDefaults sets the default values for the Nomad Traefik Provider Configuration.

type EndpointConfig

type EndpointConfig struct {
	// Address is the Nomad endpoint address, if empty it defaults to NOMAD_ADDR or "http://127.0.0.1:4646".
	Address string `` /* 148-byte string literal not displayed */
	// Region is the Nomad region, if empty it defaults to NOMAD_REGION.
	Region string `` /* 155-byte string literal not displayed */
	// Token is the ACL token to connect with Nomad, if empty it defaults to NOMAD_TOKEN.
	Token            string           `` /* 149-byte string literal not displayed */
	TLS              *types.ClientTLS `description:"Configure TLS." json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" export:"true"`
	EndpointWaitTime ptypes.Duration  `` /* 229-byte string literal not displayed */
}

type Provider

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

Provider holds configuration along with the namespace it will discover services in.

func (*Provider) Init

func (p *Provider) Init() error

Init the Nomad Traefik Provider.

func (*Provider) Provide

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

Provide allows the Nomad Traefik Provider to provide configurations to traefik using the given configuration channel.

func (*Provider) SetDefaults

func (p *Provider) SetDefaults()

SetDefaults sets the default values for the Nomad Traefik Provider.

type ProviderBuilder

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

	Namespaces []string `` /* 150-byte string literal not displayed */
}

ProviderBuilder is responsible for constructing namespaced instances of the Nomad provider.

func (*ProviderBuilder) BuildProviders

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

BuildProviders builds Nomad 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