Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRetryFailed = errors.New("Retry: 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
Click to show internal directories.
Click to hide internal directories.