retry

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RetryUpdateOnConflict

func RetryUpdateOnConflict[T any](ctx context.Context, k8s client.Client, key client.ObjectKey, mutator func(*T)) (*T, error)

RetryUpdateOnConflict is a wrapper around client-go/util/retry.RetryOnConflict, adding the following often repeated actions:

1. client.Get a resource for the given key 2. mutate the retrieved object using the given mutator function. 3. client.Update the updated resource and retry on conflict using the client-go/util/retry.DefaultRetry strategy.

Types

This section is empty.

Jump to

Keyboard shortcuts

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