func NewSimpleBackoff(ticks ...int) *SimpleBackoff {
	return &SimpleBackoff{ticks: ticks}
}
NewSimpleBackoff creates a SimpleBackoff algorithm with the specified
list of fixed intervals in milliseconds.
package client
import (
	"math"
	"math/rand"
	"sync"
	"time"
)
type BackoffF func(attempt int) (time.Duration, bool)
type Backoff interface {
	Next(attempt int) (time.Duration, bool)
}
type StopBackoff struct{}
func NewStopBackoff() *StopBackoff {
	return &StopBackoff{}
}
func (b StopBackoff) Next(attempt int) (time.Duration, bool) {
	return 0, false
}
type ConstantBackoff struct {
	interval time.Duration
}
func NewConstantBackoff(interval time.Duration) *ConstantBackoff {
	return &ConstantBackoff{interval: interval}
}
func (b *ConstantBackoff) Next(attempt int) (time.Duration, bool) {
	return b.interval, true
}
type SimpleBackoff struct {
	sync.Mutex
	ticks []int
}