Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitForResourceToBeReadyViaWatch ¶ added in v1.92.0
func WaitForResourceToBeReadyViaWatch(ctx context.Context, watch watch.Interface, logger logr.Logger) error
WaitForResourceToBeReadyViaWatch 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.
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) WaitForResourceToBeReady ¶
func (r *ResourceWatcher) WaitForResourceToBeReady(ctx context.Context, nn types.NamespacedName, gvk schema.GroupVersionKind) error
WaitForResourceToBeReady waits for the resource identified by the given GVK and NamespacedName. It blocks until the resource is ready, 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.