Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Func ¶
type Func func() error
Func is a function type that takes no arguments and returns an error. This is meant to wrap the functionality that should be retried.
type Re ¶
type Re struct {
// Max specifies the maximum number of attempts. By default, there is no
// maximum (inifinite retries).
Max uint
// Delay specifies the initial Delay between attempts. By default, the
// initial Delay is set to 0.
Delay time.Duration
// MaxDelay specifies a maximum value for the Delay. By default, no
// maximum is applied.
MaxDelay time.Duration
// Backoff specifies a multiplier to be applied to the Delay between
// attempts. The default Backoff is 1.
Backoff float64
// Jitter specifies a fixed number of seconds added to the Delay between
// attempts. By default, no Jitter is added.
Jitter time.Duration
// RetryableErrors specifies an array of merry.Error's that should be caught by the
// retry. If not specified, all RetryableErrors are caught.
RetryableErrors []merry.Error
}
Re configures the settings to be used for retries
Click to show internal directories.
Click to hide internal directories.