Version: v0.1.3 Latest Latest

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

Go to latest
Published: Nov 3, 2017 License: MPL-2.0 Imports: 5 Imported by: 0




This section is empty.


This section is empty.


func NewComposite

func NewComposite(scheds ...core.Schedule) core.Schedule

func NewCompositeConf

func NewCompositeConf(conf CompositeConf) core.Schedule

func NewConst

func NewConst(ops float64, duration time.Duration) core.Schedule

func NewConstConf

func NewConstConf(conf ConstConfig) core.Schedule

func NewDoAtSchedule

func NewDoAtSchedule(duration time.Duration, n int64, doAt DoAt) core.Schedule

func NewLine

func NewLine(from, to float64, duration time.Duration) core.Schedule

func NewLineConf

func NewLineConf(conf LineConfig) core.Schedule

func NewOnce

func NewOnce(n int64) core.Schedule

NewOnce returns schedule that emits all passed operation token at start time. That is, is schedule for zero duration, unlimited RPS, and n operations.

func NewOnceConf

func NewOnceConf(conf OnceConfig) core.Schedule

func NewUnlimited

func NewUnlimited(duration time.Duration) core.Schedule

NewUnlimited returns schedule that generates unlimited ops for passed duration.

func NewUnlimitedConf

func NewUnlimitedConf(conf UnlimitedConfig) core.Schedule


type CompositeConf

type CompositeConf struct {
	Nested []core.Schedule `config:"nested"`

type ConstConfig

type ConstConfig struct {
	Ops      float64       `validate:"min=0"`
	Duration time.Duration `validate:"min-time=1ms"`

type DoAt

type DoAt func(i int64) time.Duration

DoAt returns when i'th operation should be performed, assuming that schedule started at 0.

type LineConfig

type LineConfig struct {
	From     float64       `validate:"min=0"`
	To       float64       `validate:"min=0"`
	Duration time.Duration `validate:"min-time=1ms"`

type OnceConfig

type OnceConfig struct {
	Times int64 `validate:"min=1"` // N is decoded like bool

type UnlimitedConfig

type UnlimitedConfig struct {
	Duration time.Duration `validate:"min-time=1ms"`

Jump to

Keyboard shortcuts

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