observer

package
v0.0.0-...-c0ae054 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ReconcileActionNoPpr            = ReconcileAction("NoPpr")
	ReconcileActionSelectorMismatch = ReconcileAction("SelectorMismatch")
	ReconcileActionUpdated          = ReconcileAction("Updated")
)

Variables

Functions

func ProvideLogging

func ProvideLogging() component.Declared[Observer]

func ProvideMetrics

func ProvideMetrics() component.Declared[Observer]

Types

type Aggregated

type Aggregated struct {
	NumPods           int
	TotalReplicas     int32
	AvailableReplicas int32
}

type EndEnqueue

type EndEnqueue struct{}

type EndReconcile

type EndReconcile struct {
	Err       error
	HasChange haschange.Changed
	Action    ReconcileAction
}

type EnqueueError

type EnqueueError struct {
	Namespace string
	Name      string
	Err       error
}

type NextEventPoolSingleDrain

type NextEventPoolSingleDrain struct {
	// Number of items in a single drain.
	Size int
	// Time since the earliest item required reconciliation.
	ObjectLatency time.Duration
	// Time since the previous drain, None if this is the first run.
	TimeSinceLastDrain optional.Optional[time.Duration]
}

type Observer

type Observer struct {
	StartReconcile o11y.ObserveScopeFunc[StartReconcile]
	EndReconcile   o11y.ObserveFunc[EndReconcile]

	StartEnqueue o11y.ObserveScopeFunc[StartEnqueue]
	EndEnqueue   o11y.ObserveFunc[EndEnqueue]

	EnqueueError o11y.ObserveFunc[EnqueueError]
	Aggregated   o11y.ObserveFunc[Aggregated]

	NextEventPoolCurrentSize    o11y.MonitorFunc[util.Empty, int]
	NextEventPoolCurrentLatency o11y.MonitorFunc[util.Empty, time.Duration]
	NextEventPoolSingleDrain    o11y.ObserveFunc[NextEventPoolSingleDrain]

	TriggerPodCreate o11y.ObserveFunc[TriggerPodCreate]
	TriggerPodUpdate o11y.ObserveFunc[TriggerPodUpdate]
}

func NewLoggingObserver

func NewLoggingObserver() Observer

func (Observer) ComponentName

func (Observer) ComponentName() string

func (Observer) Join

func (observer Observer) Join(other Observer) Observer

type ReconcileAction

type ReconcileAction string

type StartEnqueue

type StartEnqueue struct {
	Namespace string
	Name      string
	Kind      string
}

type StartReconcile

type StartReconcile struct {
	Namespace string
	Name      string
}

type TriggerPodCreate

type TriggerPodCreate struct {
	Err error
}

type TriggerPodUpdate

type TriggerPodUpdate struct {
	Err error
}

Jump to

Keyboard shortcuts

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