Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultPolicy = "default" ExponentialPolicy = "exponential" JitterPolicy = "jitter" ConstantPolicy = "const" )
policies
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RetryConfig ¶
type RetryConfig struct {
WaitMin time.Duration `yaml:"wait_min"`
WaitMax time.Duration `yaml:"wait_max"`
MaxAttempts int `yaml:"max_attempts"`
Policy string `yaml:"policy,omitempty"`
// contains filtered or unexported fields
}
func (*RetryConfig) NewClient ¶
func (rc *RetryConfig) NewClient(rt http.RoundTripper, logger interface{}) (*http.Client, error)
NewClient should be called only after Validate has been called, to make sure that rc is a valid RetryConfig
func (*RetryConfig) Validate ¶
func (rc *RetryConfig) Validate() (err error)
Validate must be called once, after rc has been constructed / unmarshalled
Click to show internal directories.
Click to hide internal directories.