-- import "github.com/darylnwk/retry"
func ConstantBackoff(_ uint, delay time.Duration) time.DurationConstantBackoff defines constant backoff strategy
func ExponentialBackoff(n uint, delay time.Duration) time.DurationExponentialBackoff defines exponential backoff strategy
func Jitter(backoff time.Duration) time.DurationJitter defines a full jitter strategy
func NoBackoff(_ uint, _ time.Duration) time.DurationNoBackoff defines no backoff strategy
func NoJitter(backoff time.Duration) time.DurationNoJitter defines no jitter strategy
type Errors []errorErrors defines a list of error
func (errs Errors) Error() stringtype Retryer struct {
// Attempts defines the number of retry attempts.
// Default 1.
Attempts uint
// Backoff defines a backoff function that returns `time.Duration`.
// This is applied on subsequent attempts.
// Default no backoff.
Backoff func(n uint, delay time.Duration) time.Duration
// Jitter defines a jitter function that returns `time.Duration`.
// Default no jitter.
Jitter func(backoff time.Duration) time.Duration
// Delay defines duration to delay.
// Default 0.
Delay time.Duration
}Retryer defines a retryer
func (retryer Retryer) Do(fn func() error) (bool, Errors)Do executes fn and returns success if fn executed succesfully and any errors
that occurred