Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StickyError ¶
type StickyError struct {
// contains filtered or unexported fields
}
StickyError is a helper struct that can be used to retry an error for a given number of retries and timeout.
func NewStickyError ¶
func NewStickyError(timeout time.Duration, maxRetries int) *StickyError
NewStickyError returns a new ErrorTimeoutRetry.
func (*StickyError) Error ¶
func (e *StickyError) Error() error
Error returns an error after max retries has been met and we are within the timeout duration.
func (*StickyError) SetError ¶
func (e *StickyError) SetError(err error) error
SetError increments or resets the number of retries if the last error was within the timeout duration or the current error is nil. Returns the error provided by GetError.
Click to show internal directories.
Click to hide internal directories.