config

package
v0.0.0-...-954558f Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2025 License: Apache-2.0 Imports: 43 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
	ArangoDB      *arangodb.Config      `yaml:"arangodb,omitempty"`
	Cassandra     *cassandra.Config     `yaml:"cassandra,omitempty"`
	ClickHouse    *clickhouse.Config    `yaml:"clickhouse,omitempty"`
	CouchDB       *couchdb.Config       `yaml:"couchdb,omitempty"`
	DHCP4         *dhcp4.Config         `yaml:"dhcp4,omitempty"`
	DNS           *dns.Config           `yaml:"dns,omitempty"`
	Elasticsearch *elasticsearch.Config `yaml:"elasticsearch,omitempty"`
	ETCD          *etcd.Config          `yaml:"etcd,omitempty"`
	FTP           *ftp.Config           `yaml:"ftp,omitempty"`
	GraphQL       *graphql.Config       `yaml:"graphql,omitempty"`
	GRPC          *grpc.Config          `yaml:"grpc,omitempty"`
	HTTP          *http.Config          `yaml:"http,omitempty"`
	ICMP          *icmp.Config          `yaml:"icmp,omitempty"`
	InfluxDB      *influxdb.Config      `yaml:"influxdb,omitempty"`
	Kafka         *kafka.Config         `yaml:"kafka,omitempty"`
	LDAP          *ldap.Config          `yaml:"ldap,omitempty"`
	Memcache      *memcache.Config      `yaml:"memcache,omitempty"`
	MongoDB       *mongodb.Config       `yaml:"mongodb,omitempty"`
	MQTT          *mqtt.Config          `yaml:"mqtt,omitempty"`
	NATS          *nats.Config          `yaml:"nats,omitempty"`
	Neo4j         *neo4j.Config         `yaml:"neo4j,omitempty"`
	NTP           *ntp.Config           `yaml:"ntp,omitempty"`
	Pulsar        *pulsar.Config        `yaml:"pulsar,omitempty"`
	RabbitMQ      *rabbitmq.Config      `yaml:"rabbitmq,omitempty"`
	Redis         *redis.Config         `yaml:"redis,omitempty"`
	ScyllaDB      *scylladb.Config      `yaml:"scylladb,omitempty"`
	SNMP          *snmp.Config          `yaml:"snmp,omitempty"`
	SQL           *sql.Config           `yaml:"sql,omitempty"`
	SSH           *ssh.Config           `yaml:"ssh,omitempty"`
	Syslog        *syslog.Config        `yaml:"syslog,omitempty"`
	TCP           *tcp.Config           `yaml:"tcp,omitempty"`
	Telnet        *telnet.Config        `yaml:"telnet,omitempty"`
	TFTP          *tftp.Config          `yaml:"tftp,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.

Jump to

Keyboard shortcuts

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