Versions in this module Expand all Collapse all v1 v1.0.0 Jun 9, 2021 Changes in this version + var SleepFunc = time.Sleep + var TimeFunc = time.Now + func Do(ctx context.Context, strategy Strategy, action func() bool) bool + func DoWithReset(ctx context.Context, strategy ResettableStrategy, action func() bool) bool + type All []Strategy + func (s All) HasNext() bool + func (s All) Next() bool + type AllResettable []ResettableStrategy + func (s AllResettable) HasNext() bool + func (s AllResettable) Next() bool + func (s AllResettable) Reset() + type AlwaysRetryStrategy struct + func (s *AlwaysRetryStrategy) HasNext() bool + func (s *AlwaysRetryStrategy) Next() bool + type Any []Strategy + func (s Any) HasNext() bool + func (s Any) Next() bool + type AnyResettable []ResettableStrategy + func (s AnyResettable) HasNext() bool + func (s AnyResettable) Next() bool + func (s AnyResettable) Reset() + type CancelableRetryStrategy struct + func (s *CancelableRetryStrategy) Cancel() + func (s *CancelableRetryStrategy) HasNext() bool + func (s *CancelableRetryStrategy) Next() bool + type CountStrategy struct + Tries int + func (s *CountStrategy) HasNext() bool + func (s *CountStrategy) Next() bool + func (s *CountStrategy) Reset() + type DelayStrategy struct + Wait time.Duration + func (s *DelayStrategy) HasNext() bool + func (s *DelayStrategy) Next() bool + type ExponentialBackoffStrategy struct + InitialDelay time.Duration + MaxDelay time.Duration + func (s *ExponentialBackoffStrategy) HasNext() bool + func (s *ExponentialBackoffStrategy) Next() bool + func (s *ExponentialBackoffStrategy) Reset() + type MaximumTimeStrategy struct + Duration time.Duration + func (s *MaximumTimeStrategy) HasNext() bool + func (s *MaximumTimeStrategy) Next() bool + func (s *MaximumTimeStrategy) Reset() + type ResettableStrategy interface + Reset func() + type Strategy interface + HasNext func() bool + Next func() bool