config

package
v0.0.0-...-90d4b8e Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressPair

type AddressPair struct {
	Bind    string
	Connect string
}

func (*AddressPair) Enabled

func (a *AddressPair) Enabled() bool

func (*AddressPair) SetDefaults

func (a *AddressPair) SetDefaults()

type Config

type Config struct {
	QueueConfig AddressPair `yaml:"queue"`
	SinkConfig  AddressPair `yaml:"sink"`
	Duration    int
	Requests    int64  `yaml:"requests"`
	DbPath      string `yaml:"dbPath"`
	BatchSize   int    `yaml:"batchSize"`

	Scenarios []Scenario
}

func Load

func Load(path string) (*Config, error)

func (*Config) SetDefaults

func (c *Config) SetDefaults()

type Scenario

type Scenario struct {
	URL    string
	Method string
	Body   map[string]any

	Weight uint
}

func (*Scenario) SetDefaults

func (s *Scenario) SetDefaults()

Jump to

Keyboard shortcuts

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