Version: v1.7.19 Latest Latest

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

Go to latest
Published: Oct 28, 2019 License: MIT Imports: 11 Imported by: 0




This section is empty.


This section is empty.


func Normalize added in v1.3.0

func Normalize(name string) string

Normalize transform a string that work with the rest of traefik Replace '.' with '-' in quoted keys because of this issue

func ReverseStringSlice added in v1.3.0

func ReverseStringSlice(slice *[]string)

ReverseStringSlice invert the order of the given slice of string


type BaseProvider

type BaseProvider struct {
	Watch                     bool              `description:"Watch provider" export:"true"`
	Filename                  string            `description:"Override default configuration template. For advanced users :)" export:"true"`
	Constraints               types.Constraints `description:"Filter services by constraint, matching with Traefik tags." export:"true"`
	Trace                     bool              `description:"Display additional provider logs (if available)." export:"true"`
	TemplateVersion           int               `description:"Template version." export:"true"`
	DebugLogGeneratedTemplate bool              `description:"Enable debug logging of generated configuration template." export:"true"`

BaseProvider should be inherited by providers

func (*BaseProvider) CreateConfiguration added in v1.6.0

func (p *BaseProvider) CreateConfiguration(tmplContent string, funcMap template.FuncMap, templateObjects interface{}) (*types.Configuration, error)

CreateConfiguration create a provider configuration from content using templating

func (*BaseProvider) DecodeConfiguration added in v1.6.2

func (p *BaseProvider) DecodeConfiguration(content string) (*types.Configuration, error)

DecodeConfiguration Decode a *types.Configuration from a content

func (*BaseProvider) GetConfiguration added in v1.3.0

func (p *BaseProvider) GetConfiguration(defaultTemplate string, funcMap template.FuncMap, templateObjects interface{}) (*types.Configuration, error)

GetConfiguration return the provider configuration from default template (file or content) or overrode template file

func (*BaseProvider) Init added in v1.7.0

func (p *BaseProvider) Init(constraints types.Constraints) error

Init for compatibility reason the BaseProvider implements an empty Init

func (*BaseProvider) MatchConstraints

func (p *BaseProvider) MatchConstraints(tags []string) (bool, *types.Constraint)

MatchConstraints must match with EVERY single constraint returns first constraint that do not match or nil

type Provider

type Provider interface {
	// Provide allows the provider to provide configurations to traefik
	// using the given configuration channel.
	Provide(configurationChan chan<- types.ConfigMessage, pool *safe.Pool) error
	Init(constraints types.Constraints) error

Provider defines methods of a provider.

Source Files


Path Synopsis
Package mocks Code generated by mockery v1.0.0.
Package mocks Code generated by mockery v1.0.0.

Jump to

Keyboard shortcuts

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