Documentation ¶
Overview ¶
Package hooks has helper functions for Runtime Hooks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPending ¶
func IsPending(hook runtimecatalog.Hook, obj client.Object) bool
IsPending returns true if there is an intent to call a hook being tracked in the object's PendingHooksAnnotation.
func MarkAsDone ¶
func MarkAsDone(ctx context.Context, c client.Client, obj client.Object, hooks ...runtimecatalog.Hook) error
MarkAsDone removes the intent to call a Hook from the object's PendingHooksAnnotation. Usually this func is called after all the registered extensions for the Hook returned an answer without requests to hold on to the object's lifecycle (retryAfterSeconds).
func MarkAsPending ¶
func MarkAsPending(ctx context.Context, c client.Client, obj client.Object, hooks ...runtimecatalog.Hook) error
MarkAsPending adds to the object's PendingHooksAnnotation the intent to execute a hook after an operation completes. Usually this function is called when an operation is starting in order to track the intent to call an After<operation> hook later in the process.
Types ¶
This section is empty.