ctrlutils

package
v1.69.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCanNotMutateNameOrNamespace = errors.New("MutateFn cannot mutate object name and/or object namespace")

Functions

func UpdateStatusWithRetry

func UpdateStatusWithRetry(ctx context.Context, c client.Client, obj client.Object, f MutateFn, opts ...UpdateOption) error

func UpdateWithRetry

func UpdateWithRetry(ctx context.Context, c client.Client, obj client.Object, f MutateFn, opts ...UpdateOption) error

Types

type MutateFn

type MutateFn func() error

type UpdateOption

type UpdateOption func(optionsApplier UpdateOptionApplier)

func WithOnErrorBackoff

func WithOnErrorBackoff(b *wait.Backoff) UpdateOption

func WithRetryOnConflictBackoff

func WithRetryOnConflictBackoff(b *wait.Backoff) UpdateOption

func (UpdateOption) Apply

func (opt UpdateOption) Apply(o UpdateOptionApplier)

type UpdateOptionApplier

type UpdateOptionApplier interface {
	WithOnErrorBackoff(b *wait.Backoff)
	WithRetryOnConflictBackoff(b *wait.Backoff)
	// contains filtered or unexported methods
}

type UpdateOptions

type UpdateOptions struct {
	OnErrorBackoff         wait.Backoff
	RetryOnConflictBackoff wait.Backoff
	// contains filtered or unexported fields
}

func (*UpdateOptions) WithOnErrorBackoff

func (o *UpdateOptions) WithOnErrorBackoff(b *wait.Backoff)

func (*UpdateOptions) WithRetryOnConflictBackoff

func (o *UpdateOptions) WithRetryOnConflictBackoff(b *wait.Backoff)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL