watcher

package
v0.0.0-...-9cd5fb2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 16 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WatchTimeoutSeconds int64 = 120
)

Functions

This section is empty.

Types

type Watcher

type Watcher[T client.Object] struct {
	// contains filtered or unexported fields
}

func New

func New[T client.Object](client client.WithWatch) *Watcher[T]

func (*Watcher[T]) ByName

func (w *Watcher[T]) ByName(ctx context.Context, namespace, name string, cb func(obj T) (bool, error)) (def T, _ error)

func (*Watcher[T]) ByObject

func (w *Watcher[T]) ByObject(ctx context.Context, obj T, cb func(obj T) (bool, error)) (def T, _ error)

func (*Watcher[T]) BySelector

func (w *Watcher[T]) BySelector(ctx context.Context, namespace string, selector labels.Selector, cb func(obj T) (bool, error)) (def T, _ error)

Jump to

Keyboard shortcuts

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