func NewRetrier(maxTries int, initialDelay, maxDelay time.Duration) *Retrier {
	if maxTries <= 0 {
		maxTries = DefaultMaxTries
	}
	if initialDelay <= 0 {
		initialDelay = DefaultInitialDelay
	}
	if maxDelay <= 0 {
		maxDelay = DefaultMaxDelay
	}
	return &Retrier{maxTries, initialDelay, maxDelay}
}
NewRetrier returns a retrier for retrying functions with expoential backoff.
If any of the values are <= 0, they will be set to their respective defaults.
package retry
import (
	"context"
	"math"
	"math/rand"
	"time"
)
const (
	DefaultMaxTries     = 5
	DefaultInitialDelay = time.Millisecond * 200
	DefaultMaxDelay     = time.Millisecond * 1000
)
type Retrier struct {
	maxTries     int
	initialDelay time.Duration
	maxDelay     time.Duration
}