Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultVal ¶ added in v0.0.35
func DefaultVal[T comparable](val, def T) T
func KeysFromItems ¶ added in v0.0.8
KeysFromItems returns the int64 keys from a response Items field.
Types ¶
type BackoffConfig ¶ added in v0.0.9
type BackoffConfig struct {
Strategy BackoffStrategy `mapstructure:"strategy"`
InitialDelay time.Duration `mapstructure:"initial_delay"`
MaxDelay time.Duration `mapstructure:"max_delay"`
MaxRetries int `mapstructure:"max_retries"`
Multiplier float64 `mapstructure:"multiplier"` // Used for exponential backoff strategy
Timeout time.Duration `mapstructure:"timeout"`
}
func (BackoffConfig) NextDelay ¶ added in v0.0.9
func (c BackoffConfig) NextDelay(prev time.Duration) time.Duration
func (BackoffConfig) Validate ¶ added in v0.0.9
func (c BackoffConfig) Validate() error
type BackoffStrategy ¶ added in v0.0.9
type BackoffStrategy string
const ( BackoffFixed BackoffStrategy = "fixed" BackoffExponential BackoffStrategy = "exponential" )
type ResourceTypes ¶
func (ResourceTypes) PrettyString ¶
func (s ResourceTypes) PrettyString() string
func (ResourceTypes) String ¶
func (s ResourceTypes) String() string
type Result ¶ added in v0.0.28
Result holds the outcome for one item.
func RunBulk ¶ added in v0.0.28
RunBulk runs fn over items with up to 'parallel' workers. - If parallel <= 0, it defaults to min(8, len(items)). - Results preserve input order (results[i] corresponds to items[i]). - Honors context cancellation; any not-yet-dispatched items are marked with ctx.Err().
Click to show internal directories.
Click to hide internal directories.