watcher

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventType

type EventType string
const (
	NormalEvent  EventType = "Normal"
	WarningEvent EventType = "Warning"
)

type ObjectEventWatcher

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

func New

func New(object runtime.Object) *ObjectEventWatcher

func (*ObjectEventWatcher) SetWarningsPolicy

func (w *ObjectEventWatcher) SetWarningsPolicy(wp WarningsPolicy) *ObjectEventWatcher

func (*ObjectEventWatcher) SinceNow

func (w *ObjectEventWatcher) SinceNow() *ObjectEventWatcher

SinceNow sets a watch starting point for events, from the moment on the connection to the apiserver was established.

func (*ObjectEventWatcher) SinceObjectResourceVersion

func (w *ObjectEventWatcher) SinceObjectResourceVersion(object runtime.Object) *ObjectEventWatcher

SinceObjectResourceVersion takes the resource version of the passed in runtime object and takes it as the starting point for all events to watch for.

func (*ObjectEventWatcher) SinceResourceVersion

func (w *ObjectEventWatcher) SinceResourceVersion(rv string) *ObjectEventWatcher

SinceResourceVersion sets the passed in resourceVersion as the starting point for all events to watch for.

func (*ObjectEventWatcher) SinceWatchedObjectResourceVersion

func (w *ObjectEventWatcher) SinceWatchedObjectResourceVersion() *ObjectEventWatcher

SinceWatchedObjectResourceVersion takes the resource version of the runtime object which is watched, and takes it as the starting point for all events to watch for.

func (*ObjectEventWatcher) Timeout

func (w *ObjectEventWatcher) Timeout(duration time.Duration) *ObjectEventWatcher

func (*ObjectEventWatcher) WaitFor

func (w *ObjectEventWatcher) WaitFor(ctx context.Context, eventType EventType, reason interface{}) (e *v1.Event)

func (*ObjectEventWatcher) WaitNotFor

func (w *ObjectEventWatcher) WaitNotFor(ctx context.Context, eventType EventType, reason interface{}) (e *v1.Event)

func (*ObjectEventWatcher) Watch

func (w *ObjectEventWatcher) Watch(ctx context.Context, processFunc ProcessFunc, watchedDescription string)

type ProcessFunc

type ProcessFunc func(event *v1.Event) (done bool)

type WarningsPolicy

type WarningsPolicy struct {
	FailOnWarnings     bool
	WarningsIgnoreList []string
}

Jump to

Keyboard shortcuts

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