Documentation ¶
Index ¶
Constants ¶
const (
Stop = backoff.Stop
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackOff ¶
type BackOff = backoff.BackOff
BackOff type alias of "github.com/cenkalti/backoff/v4" BackOff, for better readability in importing
type Options ¶ added in v1.9.2
type Options interface {
// contains filtered or unexported methods
}
Option allows customization of the backoff.ExponentialBackOff
func WithMaxElapsedTime ¶ added in v1.9.2
WithMaxElapsedTime returns maxElapsedTime backoff option to override the MaxElapsedTime
func WithMaxInterval ¶ added in v1.7.1
WithMaxInterval returns maxInterval backoff option to override the MaxInterval
type SizeLimitedBackOff ¶ added in v1.7.1
type SizeLimitedBackOff interface { // NextBackOff returns the duration to wait before retrying the operation, // or backoff. NextBackOff() int // Success indicates the backoff implementation that previous request succeeded // so that it can adjust backoff accordingly for next request. Success() // Failure indicates the backoff implementation that previous request failed // so that it can adjust backoff accordingly for next request. Failure() // Reset to initial state. Reset() }
SizeLimitedBackOff defines interface for implementing a size based backoff for requests which contain number of records to be processed by server.
func NewSizeLimitedBackOff ¶ added in v1.7.1
func NewSizeLimitedBackOff(maxRequestSize int) SizeLimitedBackOff
NewSizeLimitedBackOff returns a new SizeLimitedBackOff with provided maxRequestSize and lowest request size of 1. On Failure the size gets reduced by half and on Success size gets doubled