Versions in this module Expand all Collapse all v1 v1.24.10 Oct 24, 2017 v1.24.9 Oct 24, 2017 Changes in this version + var ErrWaitTimeout = errors.New("timed out waiting for the condition") + var ForeverTestTimeout = time.Second * 30 + var NeverStop <-chan struct{} = make(chan struct{}) + func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error + func Forever(f func(), period time.Duration) + func Jitter(duration time.Duration, maxFactor float64) time.Duration + func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding bool, ...) + func NonSlidingUntil(f func(), period time.Duration, stopCh <-chan struct{}) + func Poll(interval, timeout time.Duration, condition ConditionFunc) error + func PollImmediate(interval, timeout time.Duration, condition ConditionFunc) error + func PollImmediateInfinite(interval time.Duration, condition ConditionFunc) error + func PollInfinite(interval time.Duration, condition ConditionFunc) error + func PollUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan struct{}) error + func Until(f func(), period time.Duration, stopCh <-chan struct{}) + func WaitFor(wait WaitFunc, fn ConditionFunc, done <-chan struct{}) error + type Backoff struct + Duration time.Duration + Factor float64 + Jitter float64 + Steps int + type ConditionFunc func() (done bool, err error) + type Group struct + func (g *Group) Start(f func()) + func (g *Group) StartWithChannel(stopCh <-chan struct{}, f func(stopCh <-chan struct{})) + func (g *Group) StartWithContext(ctx context.Context, f func(context.Context)) + func (g *Group) Wait() + type WaitFunc func(done <-chan struct{}) <-chan struct