retry

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Retry

func Retry(fn func() bool, params Params) error

Retry will run the specified function until it returns true or retry limits are exceeded. It returns an error if retry limits are exceeded.

Types

type Params

type Params struct {
	MaxRetries   uint64               // Default: unlimited.
	RetryTimeout time.Duration        // Default: unlimited.
	Sleeper      backoffdelay.Sleeper // Default: 100 milliseconds.
}

Jump to

Keyboard shortcuts

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