Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrPanicSuppressed = errors.New("panic suppressed")
)
Functions ¶
This section is empty.
Types ¶
type RetryError ¶
type RetryError struct {
// contains filtered or unexported fields
}
RetryError is like sync.Once except if f returns an err Do will try again the next time it's called.
func (*RetryError) Do ¶
func (o *RetryError) Do(ctx context.Context, f func() error) error
Do calls f if Do has not successfully been called before. Do will return before f completes if ctx is done, f will continue to run until it returns. Concurrent calls to Do will wait until the first f completes, returning that error. Subsequent calls to Do after an error will invoke f as if Do had not been called before.
Click to show internal directories.
Click to hide internal directories.