utils

package
v3.3.0-beta.27 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

View Source
const (
	MaxRetries     = 5
	InitialBackoff = 500 * time.Millisecond
	MaxBackoff     = 10 * time.Second
	BackoffFactor  = 2.0
)

Variables

This section is empty.

Functions

func FullJitter

func FullJitter(baseDelay time.Duration) time.Duration

FullJitter returns a random delay between [0, baseDelay], capped by MaxBackoff.

func NextBackoff

func NextBackoff(current time.Duration) time.Duration

NextBackoff calculates the next exponential backoff, respecting the MaxBackoff capped.

Types

This section is empty.

Jump to

Keyboard shortcuts

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