Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultTimeout the default timeout for the entire retry operation DefaultTimeout = time.Second * 20 // DefaultDelay the default delay between successive retry attempts DefaultDelay = time.Millisecond * 10 )
Variables ¶
This section is empty.
Functions ¶
func Do ¶
func Do(fn RetriableFunc, options ...Option) (interface{}, error)
Do retries the given function, until there is a timeout, or until the function indicates that it has completed.
Types ¶
type Option ¶
type Option func(cfg *config)
Option for a retry opteration.
type RetriableFunc ¶
RetriableFunc a function that can be retried.
Click to show internal directories.
Click to hide internal directories.