Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Do ¶
Do will run function with retry mechanism. fn is the func to run. Option can control the retry times and timeout.
func IsRecoverable ¶
IsRecoverable is used to judge whether the error is wrapped by unrecoverableError.
func Unrecoverable ¶
Unrecoverable method wrap an error to unrecoverableError. This will make retry quick return.
Types ¶
type Option ¶
type Option func(*config)
Option is used to config the retry function.
func MaxSleepTime ¶
MaxSleepTime is used to config the max interval time of each execution.
Click to show internal directories.
Click to hide internal directories.