config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigTypeJson = "jsonReader"

Variables

View Source
var AvailableConfigReader = make(map[string]ConfigReader)

Functions

This section is empty.

Types

type ConfigReader

type ConfigReader interface {
	Init([]byte) error
	CreateHammer() (types.Hammer, error)
}

ConfigReader is the interface that abstracts different config reader implementations.

func NewConfigReader

func NewConfigReader(config []byte, configType string) (reader ConfigReader, err error)

NewConfigReader is the factory method of the ConfigReader.

type JsonReader added in v0.2.0

type JsonReader struct {
	ReqCount     int          `json:"request_count"`
	LoadType     string       `json:"load_type"`
	Duration     int          `json:"duration"`
	TimeRunCount timeRunCount `json:"manual_load"`
	Steps        []step       `json:"steps"`
	Output       string       `json:"output"`
	Proxy        string       `json:"proxy"`
}

func (*JsonReader) CreateHammer added in v0.2.0

func (j *JsonReader) CreateHammer() (h types.Hammer, err error)

func (*JsonReader) Init added in v0.2.0

func (j *JsonReader) Init(jsonByte []byte) (err error)

func (*JsonReader) UnmarshalJSON added in v0.2.0

func (j *JsonReader) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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