Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ExponentialBackOff = func(n int, result interface{}) time.Duration { return time.Duration(n) * time.Duration(n) * time.Second }
ExponentialBackOff Interval
Functions ¶
func Retry ¶
func Retry( n int, interval func(n int, result interface{}) time.Duration, fn func() (interface{}, error), ) (interface{}, error)
Retry run your func "fn", if it failed, Retry will retry "n" times with "interval" algorithm
retry.Retry(10, retry.ExponentialBackOff, func() (interface{}, error) {...})
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.