backoff

package
v0.19.14 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Strategy

type Strategy interface {
	Wait() error
}

Strategy is used to avoid flooding the server with requests by adding a backoff when clients are waiting for the delta request to be completed.

func DefaultBackoff

func DefaultBackoff() Strategy

DefaultBackoff returns a sensible default Strategy (exponential with an upper bound).

func NewExponentialBackoffWithJitter

func NewExponentialBackoffWithJitter(baseDelay, maxDelay time.Duration, maxAttempts uint) Strategy

NewExponentialBackoffWithJitter creates a new instance of exponentialBackoffWithJitter

Jump to

Keyboard shortcuts

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