resourcewatcher

package
v1.154.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForResourceToBeReadyOrDeletedViaWatch added in v1.134.0

func WaitForResourceToBeReadyOrDeletedViaWatch(ctx context.Context, w watch.Interface, logger logr.Logger) error

WaitForResourceToBeReadyOrDeletedViaWatch monitors a given 'Watch' for any updates to the resource that the given 'Watch' is targeting. Note that an error is returned to signify a failure during the 'Watch' process, while nil is returned to signify the watched resource is ready or deleted.

Types

type ResourceWatcher

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

func New

func New(clientConfig *rest.Config, logger logr.Logger) (*ResourceWatcher, error)

New creates a new ResourceWatcher that uses a dynamic client to monitor the status of requested resources

func NewWithClient

func NewWithClient(dynamicClient dynamic.Interface, logger logr.Logger) *ResourceWatcher

func (*ResourceWatcher) WaitForResourceToBeReadyOrDeleted added in v1.134.0

func (r *ResourceWatcher) WaitForResourceToBeReadyOrDeleted(ctx context.Context, nn types.NamespacedName, gvk schema.GroupVersionKind) error

WaitForResourceToBeReadyOrDeleted waits for the resource identified by the given GVK and NamespacedName. It blocks until the resource is ready or deleted, an error occurs, or a context cancellation occurs. Note that a nil return value signifies that the resource is ready and no errors have occurred.

func (*ResourceWatcher) WatchResource added in v1.92.0

WatchResource creates a watch on a resource identified by the given GVK and NamespacedName.

Jump to

Keyboard shortcuts

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