Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamicWatch ¶
type DynamicWatch interface {
// Close stops the watch and frees resources.
Close()
}
DynamicWatch is a handle to a watch; closing will free resources.
type KubeView ¶
type KubeView[V any] struct { // contains filtered or unexported fields }
KubeView listens to a watch, and stores the value of a function on each object.
func WatchKube ¶
func WatchKube[V any](ctx context.Context, kube *Target, gvr schema.GroupVersionResource, fn func(*unstructured.Unstructured) V) *KubeView[V]
WatchKube constructs a KubeView.
func (*KubeView[V]) HasSyncedOnce ¶
HasSyncedOnce is true if we have seen all the objects at least once. This allows us to wait for the initial "list" to complete, though that list may be implemented via a watch.
func (*KubeView[V]) Snapshot ¶
func (m *KubeView[V]) Snapshot() map[types.NamespacedName]V
Snapshot returns a deep-copy of the map
Click to show internal directories.
Click to hide internal directories.