Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Retriable ¶
type Retriable interface { NextInterval(retry int) time.Duration Do(fn RetryFunc, retries int) (err error) }
Retriable defines contract for retriers to implement
func NewRetrier ¶
NewRetrier returns retrier with some backoff strategy
func NewRetrierFunc ¶
func NewRetrierFunc(f RetriableFunc) Retriable
NewRetrierFunc returns a retrier with a retry function defined
type RetriableFunc ¶
RetriableFunc is an adapter to allow the use of ordinary functions as a Retriable
func (RetriableFunc) NextInterval ¶
func (f RetriableFunc) NextInterval(retry int) time.Duration
NextInterval calls f(retry)
Click to show internal directories.
Click to hide internal directories.