Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UntilNoError ¶
UntilNoError retries the function `f` until it returns a nil error. It waits `retryWait` after each failed call to `f`. If the context `ctx` is canceled, the function returns immediately an error stating the number of failed tries, for how long it retried and the last error returned by `f`.
func UntilOK ¶
func UntilOK(ctx context.Context, retryWait time.Duration, f func() (ok bool, err error)) (err error)
UntilOK retries the function `f` until it returns a true value for `ok` or a non nil error. It waits `retryWait` after each failed call to `f`. If the context `ctx` is canceled, the function returns immediately an error stating the number of failed tries, for how long it retried and the context error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.