utils

package
v1.23.7 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DebounceKeySuffix = ":in_queue"

Variables

View Source
var ErrNextLoop = errors.New("stop this loop and return the associated Result object")

ErrNextLoop is not a real error. It forces the current reconciliation loop to stop and return the associated Result object

View Source
var ErrTerminateLoop = errors.New("stop this loop and do not requeue")

ErrTerminateLoop is not a real error. It forces the current reconciliation loop to stop

Functions

func CalculateExponentialBackoffWithJitter

func CalculateExponentialBackoffWithJitter(retryCount int64) time.Duration

func CurrentNamespace

func CurrentNamespace() string

func DebouncedReconcileCheck

func DebouncedReconcileCheck(ctx context.Context, lastProcessedItems *sync.Map, name types.NamespacedName) (runNow bool, alreadyQueued bool, waitTime time.Duration)

func GetObjectHash

func GetObjectHash(objs ...any) string

GetObjectHash generates a shorter FNV-1a hash for one or more objects

func HandleFinalizer

func HandleFinalizer[T client.Object](ctx context.Context, obj T, r client.Client, deleteHook func(context.Context, T) (bool, error)) (bool, error)

func IsPodConditionTrue

func IsPodConditionTrue(conditions []corev1.PodCondition, conditionType corev1.PodConditionType) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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