backoff

package
v0.0.0-...-0f2fcab Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package backoff computes retry delays.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FullJitter

func FullJitter(attempt int, base, max time.Duration, r *rand.Rand) time.Duration

FullJitter returns a random delay in [0, min(max, base*2^(attempt-1))].

Full jitter (rather than a fixed exponential schedule) spreads retries out so that thousands of deliveries failing at once against a recovering endpoint don't all come back at the same instant. See https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/.

Types

This section is empty.

Jump to

Keyboard shortcuts

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