Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultChanSize int32 = 100
)
Functions ¶
This section is empty.
Types ¶
type WatchEvent ¶
type WatchEvent[T1 any] struct { Type EventType // Object is: // * If Type is Added or Modified: the new state of the object. // * If Type is Deleted: the state of the object immediately before deletion. // * If Type is Bookmark: the object (instance of a type being watched) where // only ResourceVersion field is set. On successful restart of watch from a // bookmark resourceVersion, client is guaranteed to not get repeat event // nor miss any events. // * If Type is Error: *api.Status is recommended; other types may make sense // depending on context. Object T1 }
Event represents a single event to a watched resource. +k8s:deepcopy-gen=true
type WatchInterface ¶
type WatchInterface[T1 any] interface { // Stop stops watching. Will close the channel returned by ResultChan(). Releases // any resources used by the watch. Stop() // ResultChan returns a chan which will receive all the events. If an error occurs // or Stop() is called, the implementation will close this channel and // release any resources used by the watch. ResultChan() <-chan WatchEvent[T1] }
Interface can be implemented by anything that knows how to watch and report changes.
Click to show internal directories.
Click to hide internal directories.