Documentation ¶
Overview ¶
Package retry implements wrappers to retry function calls
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Expo ¶
func Expo(callback func() error, initInterval time.Duration, maxTime time.Duration, maxRetries ...uint64) error
Expo is exponential backoff retry. initInterval is the initial waiting time to start with. maxTime is the max time allowed to spend on the all the retries. maxRetries is the optional max number of retries allowed with default of 13.
Types ¶
type RetriableError ¶
type RetriableError struct {
Err error
}
RetriableError is an error that can be tried again
func (RetriableError) Error ¶
func (r RetriableError) Error() string
Click to show internal directories.
Click to hide internal directories.