Documentation ¶
Index ¶
- Variables
- func Do(fn RetryableFunc, opts Options) error
- type Delayer
- func CombineDelayers(combine func(ds []time.Duration) time.Duration, delayers ...Delayer) Delayer
- func ExponentialBackoffDelayer(coefficient int) Delayer
- func FixedDelayer(d time.Duration) Delayer
- func LimitDelayer(inner Delayer, limit time.Duration) Delayer
- func LinearDelayer(step time.Duration) Delayer
- func MaxDelayer(delayers ...Delayer) Delayer
- func MinDelayer(delayers ...Delayer) Delayer
- func RandomDelayer(minDelay time.Duration, maxJitter time.Duration) Delayer
- func SumDelayer(delayers ...Delayer) Delayer
- type DelayerFunc
- type Options
- type RetryableFunc
- type Stopper
- type StopperFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrStop = errors.New("stop retries")
)
Functions ¶
func Do ¶
func Do(fn RetryableFunc, opts Options) error
Types ¶
type Delayer ¶
func CombineDelayers ¶
func FixedDelayer ¶
func LinearDelayer ¶
func MaxDelayer ¶
func MinDelayer ¶
func SumDelayer ¶
type DelayerFunc ¶
type RetryableFunc ¶
type RetryableFunc func() error
type Stopper ¶
func AllStoppers ¶
func AnyStopper ¶
func DeadlineStopper ¶
func MaxAttemptsStopper ¶
func TimeoutStopper ¶
Click to show internal directories.
Click to hide internal directories.