provider

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize added in v1.3.0

func Normalize(name string) string

Normalize transform a string that work with the rest of traefik

func Replace added in v1.3.0

func Replace(s1 string, s2 string, s3 string) string

Replace is an alias for strings.Replace

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"`
	Filename    string            `description:"Override default configuration template. For advanced users :)"`
	Constraints types.Constraints `description:"Filter services by constraint, matching with Traefik tags."`
}

BaseProvider should be inherited by providers

func (*BaseProvider) GetConfiguration added in v1.3.0

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

GetConfiguration return the provider configuration using templating

func (*BaseProvider) MatchConstraints

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

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

type ClientTLS added in v1.1.0

type ClientTLS struct {
	CA                 string `description:"TLS CA"`
	Cert               string `description:"TLS cert"`
	Key                string `description:"TLS key"`
	InsecureSkipVerify bool   `description:"TLS insecure skip verify"`
}

ClientTLS holds TLS specific configurations as client CA, Cert and Key can be either path or file contents

func (*ClientTLS) CreateTLSConfig added in v1.1.0

func (clientTLS *ClientTLS) CreateTLSConfig() (*tls.Config, error)

CreateTLSConfig creates a TLS config from ClientTLS structures

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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