Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ops ¶
type Ops struct { // MaxAttempts configures the maximum amount of attempts before returning a retryError. If it is set to 0, it // fails immediately and f is never called. MaxAttempts int }
Ops implements retry.Ops and can be used to mock calls to retry.Until and retry.UntilTimeout in unit tests. This implementation ignores the `interval` parameter and doesn't wait between retries, which makes it useful for writing quick and stable unit tests.
func (*Ops) UntilTimeout ¶
UntilTimeout implements retry.Ops without waiting between retries. UntilTimeout ignores the timeout parameter and instead uses Ops.MaxAttempts to configure, how often f is retried.
Click to show internal directories.
Click to hide internal directories.