Documentation
¶
Overview ¶
Package retry contains helper methods that create retry loops using different retry strategies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExponentialBackoff ¶
type ExponentialBackoff struct { Factor int MaxInterval time.Duration MaxRetries int MaxErrorMsg string MaxErrorKey string MaxErrorValue string }
ExponentialBackoff options.
func (ExponentialBackoff) Retry ¶
func (eb ExponentialBackoff) Retry(fn func() error)
func (ExponentialBackoff) RetryUntilSuccessful ¶
func (eb ExponentialBackoff) RetryUntilSuccessful(action func() error)
RetryUntilSuccessful creates a retry loop with an exponential backoff.
func (ExponentialBackoff) RetryWithBackOff ¶
func (eb ExponentialBackoff) RetryWithBackOff(fn func() error) error
Click to show internal directories.
Click to hide internal directories.