Documentation ¶
Index ¶
- func Normalize(name string) string
- func ReverseStringSlice(slice *[]string)
- type BaseProvider
- func (p *BaseProvider) CreateConfiguration(tmplContent string, funcMap template.FuncMap, templateObjects interface{}) (*types.Configuration, error)
- func (p *BaseProvider) DecodeConfiguration(content string) (*types.Configuration, error)
- func (p *BaseProvider) GetConfiguration(defaultTemplate string, funcMap template.FuncMap, templateObjects interface{}) (*types.Configuration, error)
- func (p *BaseProvider) MatchConstraints(tags []string) (bool, *types.Constraint)
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Normalize ¶ added in v1.3.0
Normalize transform a string that work with the rest of traefik Replace '.' with '-' in quoted keys because of this issue https://github.com/BurntSushi/toml/issues/78
func ReverseStringSlice ¶ added in v1.3.0
func ReverseStringSlice(slice *[]string)
ReverseStringSlice invert the order of the given slice of string
Types ¶
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) 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, constraints types.Constraints) error }
Provider defines methods of a provider.