status

package
v0.41.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backends

type Backends struct {
	CallbackKey types.NamespacedName
	Key         types.NamespacedName
	Version     string
	URLs        map[Visibility]URLSet
	HTTPOption  v1alpha1.HTTPOption
}

func (*Backends) AddURL

func (b *Backends) AddURL(v Visibility, u url.URL)

type Manager

type Manager interface {
	DoProbes(ctx context.Context, backends Backends) (ProbeState, error)
	IsProbeActive(key types.NamespacedName) (ProbeState, bool)
}

Manager provides a way to check if an Ingress is ready

type ProbeState

type ProbeState struct {
	Version string
	Ready   bool
}

type ProbeTarget

type ProbeTarget struct {
	PodIPs  sets.Set[string]
	PodPort string
	Port    string
	URLs    []*url.URL
}

ProbeTarget contains the URLs to probes for a set of Pod IPs serving out of the same port.

type ProbeTargetLister

type ProbeTargetLister interface {
	// BackendsToProbeTargets produces list of targets for the given backends
	BackendsToProbeTargets(ctx context.Context, backends Backends) ([]ProbeTarget, error)
}

ProbeTargetLister lists all the targets that requires probing.

type Prober

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

Prober provides a way to check if a VirtualService is ready by probing the Envoy pods handling that VirtualService.

func NewProber

func NewProber(
	logger *zap.SugaredLogger,
	targetLister ProbeTargetLister,
	readyCallback func(types.NamespacedName)) *Prober

NewProber creates a new instance of Prober

func (*Prober) CancelIngressProbing

func (m *Prober) CancelIngressProbing(obj interface{})

CancelIngressProbing cancels probing of the provided Ingress

func (*Prober) CancelIngressProbingByKey

func (m *Prober) CancelIngressProbingByKey(key types.NamespacedName)

CancelIngressProbingByKey cancels probing of the Ingress identified by the provided key.

func (*Prober) CancelPodProbing

func (m *Prober) CancelPodProbing(obj interface{})

CancelPodProbing cancels probing of the provided Pod IP.

TODO(#6269): make this cancellation based on Pod x port instead of just Pod.

func (*Prober) DoProbes

func (m *Prober) DoProbes(ctx context.Context, backends Backends) (ProbeState, error)

DoProbes will start probing the desired backends. If probing is already active with the correct backend versions it will return the current state.

func (*Prober) IsProbeActive

func (m *Prober) IsProbeActive(key types.NamespacedName) (ProbeState, bool)

IsProbeActive will return the state of the probes for the given key

func (*Prober) Start

func (m *Prober) Start(done <-chan struct{}) chan struct{}

Start starts the Manager background operations

type URLSet

type URLSet = sets.Set[url.URL]

type Visibility

type Visibility = v1alpha1.IngressVisibility

Jump to

Keyboard shortcuts

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