traffic

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReadinessGateOnline = "kapacitystack.io/online"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	// On turns on the specified pods' traffic.
	On(context.Context, []*corev1.Pod) error
	// Off turns off the specified pods' traffic.
	Off(context.Context, []*corev1.Pod) error
}

Controller provide methods to control pod traffic.

type ReadinessGate

type ReadinessGate struct {
	client.Client
}

ReadinessGate controls pod traffic by setting a specific readiness gate to make the pod ready/unready so that it would be automatically added to/removed from the endpoints of Kubernetes services.

func (*ReadinessGate) Off

func (c *ReadinessGate) Off(ctx context.Context, pods []*corev1.Pod) error

func (*ReadinessGate) On

func (c *ReadinessGate) On(ctx context.Context, pods []*corev1.Pod) error

Jump to

Keyboard shortcuts

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