Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConstantBackoff ¶
type ConstantBackoff struct { Sleep time.Duration Max int // contains filtered or unexported fields }
ConstantBackoff implements Backoff interface with constant sleep time. If the error is retryable and with `RetryAfter` defined, the `RetryAfter` will be used as sleep duration.
func (*ConstantBackoff) Next ¶
func (c *ConstantBackoff) Next(err error) bool
func (*ConstantBackoff) Reset ¶
func (c *ConstantBackoff) Reset()
type RetryableError ¶
func NewRetryableErrorFromHeader ¶
func NewRetryableErrorFromHeader(err error, header http.Header) *RetryableError
NewRetryableErrorFromHeader constructs a new RetryableError from http response header and existing error.
func (*RetryableError) Error ¶
func (e *RetryableError) Error() string
Click to show internal directories.
Click to hide internal directories.