utils

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Jitter added in v0.4.1

func Jitter(t time.Duration, maxJitterPercent int) (time.Duration, error)

Jitter accepts a Duration and maximum percentage to jitter (as an int), and returns a random Duration in the range t +/- maxJitterPercent.

func JitterRequeue added in v0.4.1

func JitterRequeue(defaultDuration time.Duration, maxJitterPercent int, log logr.Logger) reconcile.Result

JitterRequeue accepts a default requeue time, a maximum percentage to jitter, and a logger, and returns a Result containing a requeue time which has been randomized with jitter.

func SliceContains

func SliceContains(s []string, value string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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