changenotifier

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	ID       types.UID
	ParentNN *types.NamespacedName
	Object   client.Object
}

Change is a single notification about a configuration entity change, addressed to the OnPremAIGateway identified by ParentNN.

type ChangeNotifier

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

ChangeNotifier is responsible for notifying about changes in the AI Gateway configuration.

func New

func New() *ChangeNotifier

New creates a new instance of ChangeNotifier.

func (*ChangeNotifier) Close

func (c *ChangeNotifier) Close()

Close closes the ChangeNotifier and releases its resources. It is safe to call multiple times. It only closes the channel once.

func (*ChangeNotifier) NotifyChange

func (c *ChangeNotifier) NotifyChange(
	ctx context.Context,
	parent *types.NamespacedName,
	obj client.Object,
)

NotifyChange sends a change notification for the given AI Gateway instance.

The notifier stores a snapshot of the object: the caller keeps owning (and mutating) the object afterwards. The generated configuration-entity reconcilers, for example, update the entity's status after notifying, and the status update's response decoding rewrites the object's fields, which would race with the consumer's reads if the object were shared.

func (*ChangeNotifier) NotifyChannel

func (c *ChangeNotifier) NotifyChannel() <-chan Change

NotifyChannel returns a channel that receives change notifications.

Jump to

Keyboard shortcuts

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