Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultVal ¶
func DefaultVal[T comparable](val, def T) T
func KeysFromItems ¶
KeysFromItems returns the int64 keys from a response Items field.
Types ¶
type BackoffConfig ¶
type BackoffConfig struct {
Strategy BackoffStrategy `mapstructure:"strategy" json:"strategy" yaml:"strategy"`
InitialDelay time.Duration `mapstructure:"initial_delay" json:"initial_delay" yaml:"initial_delay"`
MaxDelay time.Duration `mapstructure:"max_delay" json:"max_delay" yaml:"max_delay"`
MaxRetries int `mapstructure:"max_retries" json:"max_retries" yaml:"max_retries"`
Multiplier float64 `mapstructure:"multiplier" json:"multiplier" yaml:"multiplier"` // Used for exponential backoff strategy
Timeout time.Duration `mapstructure:"timeout" json:"timeout" yaml:"timeout"`
}
func (BackoffConfig) Validate ¶
func (c BackoffConfig) Validate() error
type BackoffStrategy ¶
type BackoffStrategy string
const ( BackoffFixed BackoffStrategy = "fixed" BackoffExponential BackoffStrategy = "exponential" )
type Result ¶
Result holds the outcome for one item.
Click to show internal directories.
Click to hide internal directories.