luci-go: github.com/luci/luci-go/cipd/client/cipd/internal/retry Index | Files

package retry

import "github.com/luci/luci-go/cipd/client/cipd/internal/retry"

Package retry contains helpers for doing tight retry loops.

Index

Package Files

waiter.go

func Waiter Uses

func Waiter(ctx context.Context, why string, d time.Duration) (sleep func() error, cancel func())

Waiter returns a stateful callback which sleeps a bit on each invocation until reaching a deadline.

It also returns a cancel function which must be called when abandoning the waiter to disarm any pending timers.

Package retry imports 5 packages (graph). Updated 2020-07-11. Refresh now. Tools for package owners.