statusqueue

package
v0.0.0-...-edf464d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register[T StatusWriter](q *StatusQueue, name string, col krt.Collection[T], getPatcher func(T) (kclient.Patcher, []string))

Register registers a collection to have status reconciled. The Collection is expected to produce objects that implement StatusWriter, which tells us what status to write. The name is user facing, and ends up as a fieldManager for server-side-apply. It must be unique.

Types

type StatusQueue

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

func NewQueue

func NewQueue(statusEnabled *activenotifier.ActiveNotifier) *StatusQueue

NewQueue builds a new status queue. ActiveNotifier must be provided.

func (*StatusQueue) Run

func (q *StatusQueue) Run(stop <-chan struct{})

Run starts the queue, which will process items until the channel is closed

type StatusWriter

type StatusWriter interface {
	// GetStatusTarget returns the metadata about the object we are writing to
	GetStatusTarget() model.TypedObject
	// GetConditions returns a set of conditions for the object
	GetConditions() model.ConditionSet
}

StatusWriter is a type that can write status messages

Jump to

Keyboard shortcuts

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