Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRetryFailure ¶ added in v0.3.0
func Retry ¶
func Retry(interval time.Duration, maxRetries int, f ConditionFunc) error
Retry retries f every interval until after maxRetries. The interval won't be affected by how long f takes. For example, if interval is 3s, f takes 1s, another f will be called 2s later. However, if f takes longer than interval, it will be delayed.
Types ¶
type ConditionFunc ¶
type RetryError ¶
type RetryError struct {
// contains filtered or unexported fields
}
func (*RetryError) Error ¶
func (e *RetryError) Error() string
Click to show internal directories.
Click to hide internal directories.