backoff

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 2 Imported by: 0

README

backoff

Exponential backoff library

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backoff

func Backoff(config Config, timeout time.Duration, callback func() (bool, error)) error

Backoff calls the callback function, progressively backing off until either the function succeeds, and error condition is hit, or a timeout occurs.

Types

type Config

type Config struct {
	Min  time.Duration
	Max  time.Duration
	Step float64
}

Jump to

Keyboard shortcuts

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