Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdateWork ¶
func CreateOrUpdateWork(ctx context.Context, c client.Client, workMeta metav1.ObjectMeta, resource *unstructured.Unstructured, options ...WorkOption) error
CreateOrUpdateWork creates a Work object if not exist, or updates if it already exists.
Types ¶
type WorkOption ¶
type WorkOption func(work *workv1alpha1.Work)
WorkOption is a function that applies changes to a Work object. It is used to configure Work fields for clients of CreateOrUpdateWork.
func WithPreserveResourcesOnDeletion ¶
func WithPreserveResourcesOnDeletion(preserveResourcesOnDeletion bool) WorkOption
WithPreserveResourcesOnDeletion sets the PreserveResourcesOnDeletion field of the Work Spec.
func WithSuspendDispatching ¶
func WithSuspendDispatching(suspendDispatching bool) WorkOption
WithSuspendDispatching sets the SuspendDispatching field of the Work Spec.
Click to show internal directories.
Click to hide internal directories.