jitter

package
v1.122.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultJitterGenerator added in v1.117.0

type DefaultJitterGenerator struct {
	// contains filtered or unexported fields
}

func NewDefaultGenerator added in v1.117.0

func (*DefaultJitterGenerator) JitteredReenqueue added in v1.117.0

func (l *DefaultJitterGenerator) JitteredReenqueue(gvk schema.GroupVersionKind, obj metav1.Object) (time.Duration, error)

JitteredReenqueue returns a wait duration to reenqueue the request based on configured reconcile interval in TF servicemapping, DCL metadata, IAM resource config. The wait duration can be overridden with the reconcile interval configured as the object's annotation.

Use JitteredReenqueue whenever we need to reenqueue a reconciliation.

func (*DefaultJitterGenerator) WatchJitteredTimeout added in v1.117.0

func (l *DefaultJitterGenerator) WatchJitteredTimeout() time.Duration

WatchJitteredTimeout returns a wait duration to reenqueue the request between 1/2 * MeanReconcileReenqueuePeriod and 3/2 * MeanReconcileReenqueuePeriod (not inclusive of upper bound). The mean duration to reenqueue is MeanReconcileReenqueuePeriod.

Use WatchJitteredTimeout whenever we need to wait for a resource to be ready.

type Generator added in v1.117.0

type Generator interface {
	// WatchJitteredTimeout returns a wait duration to reenqueue the request between
	// 1/2 * MeanReconcileReenqueuePeriod and 3/2 * MeanReconcileReenqueuePeriod (not inclusive of
	// upper bound). The mean duration to reenqueue is MeanReconcileReenqueuePeriod.
	//
	// Use WatchJitteredTimeout whenever we need to wait for a resource to be ready.
	WatchJitteredTimeout() time.Duration

	// JitteredReenqueue returns a wait duration to reenqueue the request based
	// on configured reconcile interval in TF servicemapping, DCL metadata, IAM resource config.
	// The wait duration can be overridden with the reconcile interval configured as the object's annotation.
	//
	// Use JitteredReenqueue whenever we need to reenqueue a reconciliation.
	JitteredReenqueue(gvk schema.GroupVersionKind, obj metav1.Object) (time.Duration, error)
}

type SimpleJitterGenerator added in v1.117.0

type SimpleJitterGenerator struct {
}

SimpleJitterGenerator does not have any service mapping knowledge.

func (*SimpleJitterGenerator) JitteredReenqueue added in v1.117.0

func (*SimpleJitterGenerator) JitteredReenqueue(gvk schema.GroupVersionKind, obj metav1.Object) (time.Duration, error)

JitteredReenqueue not implemented as it relies on service mapping knowledge.

func (*SimpleJitterGenerator) WatchJitteredTimeout added in v1.117.0

func (*SimpleJitterGenerator) WatchJitteredTimeout() time.Duration

WatchJitteredTimeout implements Generator.

Jump to

Keyboard shortcuts

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