config

package
v0.0.0-...-e917273 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Plan Plan `yaml:"plan"`
}

Config is used for running a load test.

type Distributed

type Distributed struct {
	Manager string `yaml:"manager"`
}

Distributed is configuration for distributed generators.

type ExecutionState

type ExecutionState int

ExecutionState is a execution state

const (
	// Waiting is the waiting state.
	Waiting ExecutionState = iota
	// Running is when something is running.
	Running
	// Paused is when something is paused.
	Paused
	// Complete is when something is complete.
	Complete
)

type Limiter

type Limiter struct {
	Bytes      *int           `yaml:"bytes,omitempty"`
	Ops        *int           `yaml:"ops,omitempty"`
	Downsample bool           `yaml:"downsample"`
	SlowStart  *time.Duration `yaml:"slowStart,omitempty"`
}

Limiter is used for configuring ratelimiters.

type Plan

type Plan struct {
	Name      string   `yaml:"name"`
	Executors int      `yaml:"executors"`
	Stages    []*Stage `yaml:"stages"`
	Tags      []string `yaml:"tags,omitempty"`

	Repeat   int            `yaml:"repeat,omitempty"`
	Duration *time.Duration `yaml:"duration,omitempty"`
	Start    *time.Time     `yaml:"start,omitempty"`
	// contains filtered or unexported fields
}

Plan is a load testing plan.

func (*Plan) Validate

func (p *Plan) Validate() error

Validate is used to validate a Plan.

func (*Plan) WaitStart

func (p *Plan) WaitStart(ctx context.Context) error

WaitStart is used to wait until the start of the plan if configured.

type Stage

type Stage struct {
	State ExecutionState `yaml:"state"`

	Name       string   `yaml:"name"`
	Tags       []string `yaml:"tags,omitempty"`
	Children   []*Stage `yaml:"children,omitempty"`
	Concurrent int      `yaml:"concurrent"` // if children should execute concurrent
	Repeat     int      `yaml:"repeat"`     // number of times to repeat the stage

	Duration *time.Duration `yaml:"duration,omitempty"`
	Timeout  *time.Duration `yaml:"timeout,omitempty"`

	// Stage types
	DHCP4     *dhcp4.Config     `yaml:"dhcp4,omitempty"`
	DNS       *dns.Config       `yaml:"dns,omitempty"`
	ETCD      *etcd.Config      `yaml:"etcd,omitempty"`
	HTTP      *http.Config      `yaml:"http,omitempty"`
	LDAP      *ldap.Config      `yaml:"ldap,omitempty"`
	Memcache  *memcache.Config  `yaml:"memcache,omitempty"`
	Redis     *redis.Config     `yaml:"redis,omitempty"`
	SNMP      *snmp.Config      `yaml:"snmp,omitempty"`
	SQL       *sql.Config       `yaml:"sql,omitempty"`
	SSH       *ssh.Config       `yaml:"ssh,omitempty"`
	UDP       *udp.Config       `yaml:"udp,omitempty"`
	Websocket *websocket.Config `yaml:"websocket,omitempty"`
	// contains filtered or unexported fields
}

Stage is a part of a plan.

func StageFrom

func StageFrom(r *ghttp.Request) (*Stage, error)

StageFrom is used to convert a HTTP request to a Stage config.

func (*Stage) Validate

func (s *Stage) Validate() error

Validate is used to validate a stage.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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