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 ¶
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
func (r *ResourceWatcher) WatchResource(ctx context.Context, nn types.NamespacedName, gvk schema.GroupVersionKind) (watch.Interface, error)
WatchResource creates a watch on a resource identified by the given GVK and NamespacedName.