types

package
v1.0.0-beta.374 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidLoadBalancerMethod = errors.New("Invalid method, using default")

ErrInvalidLoadBalancerMethod is thrown when the specified load balancing method is invalid.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Servers        map[string]Server `json:"servers,omitempty"`
	CircuitBreaker *CircuitBreaker   `json:"circuitBreaker,omitempty"`
	LoadBalancer   *LoadBalancer     `json:"loadBalancer,omitempty"`
}

Backend holds backend configuration.

type CircuitBreaker

type CircuitBreaker struct {
	Expression string `json:"expression,omitempty"`
}

CircuitBreaker holds circuit breaker configuration.

type ConfigMessage

type ConfigMessage struct {
	ProviderName  string
	Configuration *Configuration
}

ConfigMessage hold configuration information exchanged between parts of traefik.

type Configuration

type Configuration struct {
	Backends  map[string]*Backend  `json:"backends,omitempty"`
	Frontends map[string]*Frontend `json:"frontends,omitempty"`
}

Configuration of a provider.

type Frontend

type Frontend struct {
	EntryPoints    []string         `json:"entryPoints,omitempty"`
	Backend        string           `json:"backend,omitempty"`
	Routes         map[string]Route `json:"routes,omitempty"`
	PassHostHeader bool             `json:"passHostHeader,omitempty"`
}

Frontend holds frontend configuration.

type LoadBalancer

type LoadBalancer struct {
	Method string `json:"method,omitempty"`
}

LoadBalancer holds load balancing configuration.

type LoadBalancerMethod

type LoadBalancerMethod uint8

LoadBalancerMethod holds the method of load balancing to use.

const (
	// Wrr (default) = Weighted Round Robin
	Wrr LoadBalancerMethod = iota
	// Drr = Dynamic Round Robin
	Drr
)

func NewLoadBalancerMethod

func NewLoadBalancerMethod(loadBalancer *LoadBalancer) (LoadBalancerMethod, error)

NewLoadBalancerMethod create a new LoadBalancerMethod from a given LoadBalancer.

type Route

type Route struct {
	Rule string `json:"rule,omitempty"`
	// ⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠
	// TODO: backwards compatibility with DEPRECATED rule.Value
	Value string `json:"value,omitempty"`
}

Route holds route configuration.

type Server

type Server struct {
	URL    string `json:"url,omitempty"`
	Weight int    `json:"weight,omitempty"`
}

Server holds server configuration.

Jump to

Keyboard shortcuts

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