api

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Mar 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
	IgnoreCommonFlags bool
}

type Constructor

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

type Options

type Options struct {
	MaxDuration   time.Duration
	Concurrency   int
	Verbose       bool
	VerboseFail   bool
	MaxIterations int32
	IgnoreDropped bool
	Scenario      string
}

type Parameter

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

type RateFunction

type RateFunction func(time.Time) int

func NewDistribution

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

func WithJitter

func WithJitter(rate RateFunction, multiple float64) RateFunction

type Rates

type Rates struct {
	IterationDuration time.Duration
	Rate              RateFunction
	Duration          time.Duration
}

type Trigger

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

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