traffic

package
v1.1.25 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StackTrafficWeightsAnnotationKey   = "zalando.org/stack-traffic-weights"
	DefaultBackendWeightsAnnotationKey = "zalando.org/backend-weights"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type StackTrafficWeight

type StackTrafficWeight struct {
	Name         string
	Weight       float64
	ActualWeight float64
}

type Switcher

type Switcher struct {
	// contains filtered or unexported fields
}

Switcher is able to switch traffic between stacks.

func NewSwitcher

func NewSwitcher(client clientset.Interface, backendWeightsAnnotationKey string) *Switcher

NewSwitcher initializes a new traffic switcher.

func (*Switcher) Switch

func (t *Switcher) Switch(stackset, stack, namespace string, weight float64) ([]StackTrafficWeight, error)

Switch changes traffic weight for a stack.

func (*Switcher) TrafficWeights

func (t *Switcher) TrafficWeights(stackset, namespace string) ([]StackTrafficWeight, error)

TrafficWeights returns a list of stacks with their current traffic weight.

Jump to

Keyboard shortcuts

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