api

package
v1.0.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	Name        string
	Description string
	New         Constructor
	Flags       *pflag.FlagSet
}

type Constructor

type Constructor func(*pflag.FlagSet) (*Trigger, error)

type Parameter

type Parameter struct {
	Name        string
	Short       string
	Description string
	Default     string
}

type RateFunction

type RateFunction func(time.Time) int

func NewDistribution added in v1.0.14

func NewDistribution(distributionTypeArg string, iterationDuration time.Duration, rateFn RateFunction) (time.Duration, RateFunction, error)

func WithJitter

func WithJitter(rate RateFunction, multiple float64) RateFunction

type Trigger

type Trigger struct {
	Trigger     WorkTriggerer
	DryRun      RateFunction
	Description string
	Duration    time.Duration
}

type WorkTriggerer

type WorkTriggerer func(doWork chan<- bool, stop <-chan bool, workDone <-chan bool, options options.RunOptions)

func NewIterationWorker

func NewIterationWorker(iterationDuration time.Duration, rate RateFunction) WorkTriggerer

NewIterationWorker produces a WorkTriggerer which triggers work at fixed intervals.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL