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 Switcher ¶
type Switcher struct {
// contains filtered or unexported fields
}
Switcher is able to switch traffic between stacks.
func NewSwitcher ¶
NewSwitcher initializes a new traffic switcher.
func (*Switcher) Switch ¶
func (t *Switcher) Switch(ctx context.Context, stackset, stack, namespace string, weight float64) ([]StackTrafficWeight, error)
Switch changes traffic weight for a stack.
func (*Switcher) TrafficWeights ¶
func (t *Switcher) TrafficWeights(ctx context.Context, stackset, namespace string) ([]StackTrafficWeight, error)
TrafficWeights returns a list of stacks with their current traffic weight.
Click to show internal directories.
Click to hide internal directories.