agent

package
v0.3.0-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoadAgent

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

LoadAgent is the object acting as a client to the load-test agent HTTP API.

func New

func New(config LoadAgentConfig) (*LoadAgent, error)

New creates and initializes a new LoadAgent for the given config. An error is returned if the initialization fails.

func (*LoadAgent) AddUsers

func (a *LoadAgent) AddUsers(n int) error

func (*LoadAgent) RemoveUsers

func (a *LoadAgent) RemoveUsers(n int) error

func (*LoadAgent) Start

func (a *LoadAgent) Start() error

func (*LoadAgent) Status

func (a *LoadAgent) Status() *loadtest.Status

func (*LoadAgent) Stop

func (a *LoadAgent) Stop() error

type LoadAgentConfig

type LoadAgentConfig struct {
	// A sring that identifies the load-test agent instance.
	Id string
	// The API URL used to control the specified load-test instance.
	ApiURL string
	// The configuration for the load-test to run.
	LoadTestConfig loadtest.Config
}

LoadAgentConfig holds information about the load-test agent instance.

func (LoadAgentConfig) IsValid

func (c LoadAgentConfig) IsValid() error

IsValid checks whether a LoadAgentConfig is valid or not. Returns an error if the validation fails.

Jump to

Keyboard shortcuts

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