Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // INFINITE_ATTEMPT for unlimited attempt. INFINITE_ATTEMPT = -1 // Errros. ERR_INVALID_MAX_ATTEMPT = errors.New("MaxAttempt must be -1 (INFINITE_ATTEMPT) or > 0") ERR_MISSING_WORK_FN = errors.New("WorkFn can't be empty") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// MaxAttempt refer to maximum attempts are allowed (start from 0).
// Use INFINITE_ATTEMPT for unlimited attempt
MaxAttempt int
// Delay will delay each attempt.
Delay Delay
}
Config provides configuration to run the retry.
Click to show internal directories.
Click to hide internal directories.