Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ BaseDelay: 1.0 * time.Second, Multiplier: 1.0, Jitter: 0.2, MaxDelay: 120 * time.Second, }
DefaultConfig is a backoff configuration with default values. This should be useful for callers who want to configure backoff with non-default values only for a subset of the options.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
BaseDelay time.Duration
Multiplier float64
Jitter float64
MaxDelay time.Duration
}
Config defines the configuration options for backoff.
type Exponential ¶
type Exponential struct {
Config
}
Exponential is an implementation of a backoff strategy applying an exponential function.
Click to show internal directories.
Click to hide internal directories.