Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PatchClient ¶
type PatchClient[R runtime.Object] interface { Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (R, error) }
PatchClient is just the Patch API with a generic to keep use sites type safe. This is inspired by the commiter code in https://github.com/kcp-dev/kcp/blob/main/pkg/reconciler/committer/committer.go
type PatchOptions ¶
type PatchOptions struct { // IgnoreResourceVersion will ignore the resource version matching when patching. IgnoreResourceVersion bool }
type Patcher ¶
type Patcher[R runtime.Object, Sp any, St any] interface { AddFinalizer(context.Context, R, ...string) (bool, error) RemoveFinalizer(context.Context, R, ...string) error PatchStatus(context.Context, R, St, St) (bool, error) PatchSpec(context.Context, R, Sp, Sp) (bool, error) PatchLabelAnnotations(context.Context, R, metav1.ObjectMeta, metav1.ObjectMeta) (bool, error) WithOptions(options PatchOptions) Patcher[R, Sp, St] }
func NewPatcher ¶
Click to show internal directories.
Click to hide internal directories.