provider

package
v1.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2017 License: MIT Imports: 11 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 ReverseStringSlice added in v1.3.0

func ReverseStringSlice(slice *[]string)

ReverseStringSlice invert the order of the given slice of string

func SplitAndTrimString added in v1.4.0

func SplitAndTrimString(separatedString string) []string

SplitAndTrimString splits separatedString at the comma character and trims each piece, filtering out empty pieces. Returns the list of pieces or nil if the input did not contain a non-empty piece.

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."`
	Trace                     bool              `description:"Display additional provider logs (if available)."`
	DebugLogGeneratedTemplate bool              `description:"Enable debug logging of generated configuration template."`
}

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 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
mocks
Package mocks Code generated by mockery v1.0.0 mockery -recursive -dir=vendor/github.com/gambol99/ -name=Marathon -output=provider/marathon/mocks
Package mocks Code generated by mockery v1.0.0 mockery -recursive -dir=vendor/github.com/gambol99/ -name=Marathon -output=provider/marathon/mocks

Jump to

Keyboard shortcuts

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