Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DistributionType ¶ added in v2.1.0
type DistributionType string
const ( NoneDistribution DistributionType = "none" RegularDistribution DistributionType = "regular" RandomDistribution DistributionType = "random" )
type RateFunction ¶
func NewDistribution ¶
func NewDistribution( distributionTypeArg DistributionType, iterationDuration time.Duration, rateFn RateFunction, randomFnArg func(int) int, ) (time.Duration, RateFunction, error)
func WithJitter ¶
func WithJitter(rate RateFunction, multiple float64) RateFunction
type Rates ¶
type Rates struct {
Rate RateFunction
IterationDuration time.Duration
Duration time.Duration
}
type Trigger ¶
type Trigger struct {
Trigger WorkTriggerer
DryRun RateFunction
Description string
Options Options
Duration time.Duration
}
type WorkTriggerer ¶
type WorkTriggerer func(ctx context.Context, output *ui.Output, workers *workers.PoolManager, options options.RunOptions)
func NewIterationWorker ¶
func NewIterationWorker(iterationDuration time.Duration, rate RateFunction) WorkTriggerer
NewIterationWorker produces a WorkTriggerer which triggers work at fixed intervals.
Click to show internal directories.
Click to hide internal directories.