status

package
v3.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBufferSize = 8192

DefaultBufferSize indicates the buffer size of the underlying channels that will be created for object kinds by default. This literally equates to the number of Kubernetes objects which can be in the queue at a single time.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

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

Queue provides a pub/sub queue with channels for individual Kubernetes objects, the purpose of which is to submit GenericEvents for those objects to trigger reconciliation when the object has been successfully configured in the dataplane so that its status can be updated (for instance, with IP address information in the case of Ingress resources).

func NewQueue

func NewQueue(opts ...QueueOption) *Queue

NewQueue provides a new Queue object which can be used to publish status update events or subscribe to those events.

func (*Queue) Publish

func (q *Queue) Publish(obj client.Object)

Publish emits a GenericEvent for the provided objects that indicates to subscribers that the status of that object needs to be updated. It's a no-op if there are no subscriptions for the object kind.

func (*Queue) Subscribe

func (q *Queue) Subscribe(gvk schema.GroupVersionKind) chan event.GenericEvent

Subscribe provides a consumer channel where generic events for the provided object kind will be published when the status for the object needs to be updated.

Please note every call to Subscribe will create a new subscription channel.

type QueueOption

type QueueOption func(*Queue)

QueueOption provides a functional option for configuring a Queue object.

func WithBufferSize

func WithBufferSize(size int) QueueOption

WithBufferSize sets the buffer size of the underlying channels that will be created for object kinds.

Jump to

Keyboard shortcuts

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