backoff

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(initialBackoff, maxBackoff time.Duration, maxCalls int, f func() error) error

Do retries the function f backing off the double of time each retry until a successfully call is made. initialBackoff is minimal time to wait for the next call maxBackoff is the maximum time between calls, if is 0 there is no maximum maxCalls is the maximum number of call to the function, if is 0 there is no maximum

Types

This section is empty.

Jump to

Keyboard shortcuts

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