artillery

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultManifestDir = "artillery-manifests"
View Source
const DefaultScriptsDir = "artillery-scripts"
View Source
const LabelPrefix = "loadtest"
View Source
const LoadTestFilename = "loadtest-cr.yaml"

Variables

This section is empty.

Functions

func CopyFileTo

func CopyFileTo(dir string, srcPath string) error

func DirOrFileExists

func DirOrFileExists(path string) bool

func JsonToYaml

func JsonToYaml(j []byte, spaces int) ([]byte, error)

func MkdirAllTargetOrDefault

func MkdirAllTargetOrDefault(workingDir, targetDir, defaultDir string) (string, error)

func NewIOLogger

func NewIOLogger(stdOut io.Writer, stdErr io.Writer) logr.Logger

Types

type CLISettings

type CLISettings struct {
	File      string                `yaml:"-" json:"-"`
	Analytics *TelemetryCLISettings `yaml:"kubectl-artillery,omitempty" json:"kubectl-artillery,omitempty"`
}

func GetOrCreateCLISettings

func GetOrCreateCLISettings() (*CLISettings, error)

func (*CLISettings) GetFirstRun

func (s *CLISettings) GetFirstRun() bool

func (*CLISettings) Save

func (s *CLISettings) Save() error

func (*CLISettings) SetFirstRun

func (s *CLISettings) SetFirstRun(b bool) *CLISettings

type Config added in v0.1.1

type Config struct {
	Target       string                 `json:"target" yaml:"target"`
	Phases       []Phase                `json:"phases,omitempty" yaml:"phases,omitempty"`
	Environments map[string]Environment `json:"environments,omitempty" yaml:"environments,omitempty"`
}

type Environment added in v0.1.1

type Environment struct {
	Phases  []Phase                `json:"phases" yaml:"phases"`
	Target  string                 `json:"target,omitempty" yaml:"target,omitempty"`
	Plugins map[string]interface{} `json:"plugins" yaml:"plugins"`
}

type FileMarshaler

type FileMarshaler interface {
	MarshalWithIndent(int) ([]byte, error)
}

type Flow added in v0.1.1

type Flow struct {
	GetFlow GetFlow `json:"get,omitempty" yaml:"get,omitempty"`
}

type Generatable

type Generatable struct {
	Path      string
	Marshaler FileMarshaler
}

type Generatables

type Generatables []Generatable

func (Generatables) Generate

func (gs Generatables) Generate(indent int) (string, error)

type GetFlow added in v0.1.1

type GetFlow struct {
	Url    string       `json:"url,omitempty" yaml:"url,omitempty"`
	Expect []StatusCode `json:"expect,omitempty" yaml:"expect,omitempty"`
}

type IOLogger

type IOLogger struct {
	// contains filtered or unexported fields
}

func (*IOLogger) Enabled

func (l *IOLogger) Enabled() bool

func (*IOLogger) Error

func (l *IOLogger) Error(err error, msg string, keysAndValues ...interface{})

func (*IOLogger) Info

func (l *IOLogger) Info(msg string, keysAndValues ...interface{})

func (*IOLogger) V

func (l *IOLogger) V(_ int) logr.Logger

func (*IOLogger) WithName

func (l *IOLogger) WithName(_ string) logr.Logger

func (*IOLogger) WithValues

func (l *IOLogger) WithValues(keysAndValues ...interface{}) logr.Logger

type Kustomization

type Kustomization struct {
	*types.Kustomization
}

func NewKustomization

func NewKustomization(loadtest, configMap, testScript, labelPrefix string) *Kustomization

func (*Kustomization) MarshalWithIndent

func (k *Kustomization) MarshalWithIndent(indent int) ([]byte, error)

type Phase added in v0.1.1

type Phase struct {
	Duration     int `json:"duration,omitempty" yaml:"duration,omitempty"`
	ArrivalCount int `json:"arrivalCount,omitempty" yaml:"arrivalCount,omitempty"`
	ArrivalRate  int `json:"arrivalRate,omitempty" yaml:"arrivalRate,omitempty"`
}

type Scenario added in v0.1.1

type Scenario struct {
	Flows []Flow `json:"flow,omitempty" yaml:"flow,omitempty"`
}

type StatusCode added in v0.1.1

type StatusCode struct {
	Code int `json:"statusCode,omitempty" yaml:"statusCode,omitempty"`
}

type TelemetryCLISettings

type TelemetryCLISettings struct {
	FirstRun *bool `yaml:"telemetry-first-run-msg,omitempty" json:"telemetry-first-run-msg,omitempty"`
}

type TestScript added in v0.1.1

type TestScript struct {
	Config    Config     `json:"config" yaml:"config"`
	Scenarios []Scenario `json:"scenarios" yaml:"scenarios"`
}

func NewTestScript added in v0.1.1

func NewTestScript(probes kube.ServiceProbes) *TestScript

func (*TestScript) MarshalWithIndent added in v0.1.1

func (t *TestScript) MarshalWithIndent(indent int) ([]byte, error)

Jump to

Keyboard shortcuts

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