watcher

package
v0.0.0-...-f0c486d Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWatchClosed = errors.New("watch closed before UntilWithoutRetry timeout")

ErrWatchClosed is returned when the watch channel is closed before timeout in UntilWithoutRetry.

Functions

func UntilWithoutRetry

func UntilWithoutRetry(ctx context.Context, watcher watch.Interface,
	conditions ...ConditionFunc) (*watch.Event, error)

Types

type ConditionFunc

type ConditionFunc func(event watch.Event) (bool, error)

ConditionFunc returns true if the condition has been reached, false if it has not been reached yet, or an error if the condition cannot be checked and should terminate. In general, it is better to define level driven conditions over edge driven conditions (pod has ready=true, vs pod modified and ready changed from false to true).

type IObject

type IObject interface {
	Watch(context context.Context, opts metav1.ListOptions) (watch.Interface, error)
}

Jump to

Keyboard shortcuts

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