Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Watcher ¶
type Watcher[T1 any] struct { // interfce to the observer Cancel func() ResultChannel chan watch.WatchEvent[T1] WatcherManager watchermanager.WatcherManager[T1] New func() T1 // contains filtered or unexported fields }
implements the watchermanager Watcher interface implenents the k8s watch.Interface interface
func (*Watcher[T1]) ListAndWatch ¶
func (*Watcher[T1]) OnChange ¶
func (r *Watcher[T1]) OnChange(eventType watch.WatchEvent[T1]) bool
Implement the watcchermanafer.Watcher interface OnChange is the callback called when a object changes.
func (*Watcher[T1]) ResultChan ¶
func (r *Watcher[T1]) ResultChan() <-chan watch.WatchEvent[T1]
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.
type WatcherU ¶
type WatcherU struct { // interfce to the observer Cancel func() ResultChannel chan watch.WatchEvent[runtime.Unstructured] WatcherManager watchermanager.WatcherManager[runtime.Unstructured] New func() runtime.Unstructured // contains filtered or unexported fields }
implements the watchermanager Watcher interface implenents the k8s watch.Interface interface
func (*WatcherU) ListAndWatch ¶
func (r *WatcherU) ListAndWatch(ctx context.Context, store store.UnstructuredStore, opts ...store.ListOption)
func (*WatcherU) OnChange ¶
func (r *WatcherU) OnChange(eventType watch.WatchEvent[runtime.Unstructured]) bool
Implement the watcchermanafer.Watcher interface OnChange is the callback called when a object changes.
func (*WatcherU) ResultChan ¶
func (r *WatcherU) ResultChan() <-chan watch.WatchEvent[runtime.Unstructured]
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.