retry

package
Version: v4.15.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRetryFailed = newError("all retry attempts failed")
)

Functions

This section is empty.

Types

type Strategy added in v1.1.1

type Strategy interface {
	// On performs a retry on a specific function, until it doesn't return any error.
	On(func() error) error
}

Strategy is a way to retry on a specific function.

func ExponentialBackoff

func ExponentialBackoff(attempts int, delay uint32) Strategy

func Timed

func Timed(attempts int, delay uint32) Strategy

Timed returns a retry strategy with fixed interval.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL