Documentation ¶
Index ¶
- Variables
- type Retryable
- func (r *Retryable) Function(i interface{}) *Retryable
- func (r *Retryable) MaxAttemptTimes(n int64) *Retryable
- func (r *Retryable) MaxDelay(d time.Duration) *Retryable
- func (r *Retryable) Stack(n int, all bool) *Retryable
- func (r *Retryable) Try() error
- func (r *Retryable) WaitFixed(d time.Duration) *Retryable
- func (r *Retryable) WaitRandom(min, max time.Duration) *Retryable
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTimeout = fmt.Errorf("timeout error") ErrNoFunctionSpecified = fmt.Errorf("no function is specified") )
errors
Functions ¶
This section is empty.
Types ¶
type Retryable ¶
type Retryable struct {
// contains filtered or unexported fields
}
Retryable model consisting of retry options
func (*Retryable) Function ¶
Function set function i should be a function with no output or last output should be an error
func (*Retryable) MaxAttemptTimes ¶
MaxAttemptTimes set max attempt times
Click to show internal directories.
Click to hide internal directories.