Documentation ¶
Index ¶
- type LoadAgentCluster
- func (c *LoadAgentCluster) DecrementUsers(n int) error
- func (c *LoadAgentCluster) IncrementUsers(n int) error
- func (c *LoadAgentCluster) InjectAction(actionID string) error
- func (c *LoadAgentCluster) Run() error
- func (c *LoadAgentCluster) Shutdown()
- func (c *LoadAgentCluster) Status() (Status, error)
- func (c *LoadAgentCluster) Stop() error
- type LoadAgentClusterConfig
- type LoadAgentConfig
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoadAgentCluster ¶
type LoadAgentCluster struct {
// contains filtered or unexported fields
}
LoadAgentCluster is the object holding information about all the load-test agents available in the cluster.
func New ¶
func New(config LoadAgentClusterConfig, ltConfig loadtest.Config, log *mlog.Logger) (*LoadAgentCluster, error)
New creates and initializes a new LoadAgentCluster for the given config. An error is returned if the initialization fails.
func (*LoadAgentCluster) DecrementUsers ¶
func (c *LoadAgentCluster) DecrementUsers(n int) error
DecrementUsers decrements the total number of active users in the load-test custer by the provided amount.
func (*LoadAgentCluster) IncrementUsers ¶
func (c *LoadAgentCluster) IncrementUsers(n int) error
IncrementUsers increments the total number of active users in the load-test custer by the provided amount.
func (*LoadAgentCluster) InjectAction ¶ added in v1.10.0
func (c *LoadAgentCluster) InjectAction(actionID string) error
InjectAction injects an action into all the agents. The action is run once, at the next possible opportunity.
func (*LoadAgentCluster) Run ¶
func (c *LoadAgentCluster) Run() error
Run starts all the load-test agents available in the cluster.
func (*LoadAgentCluster) Shutdown ¶
func (c *LoadAgentCluster) Shutdown()
Shutdown stops and destroys all the load-test agents available in the cluster. It makes sure agent.Destroy() is called once for every agent in the cluster.
func (*LoadAgentCluster) Status ¶
func (c *LoadAgentCluster) Status() (Status, error)
Status returns the current status of the LoadAgentCluster.
func (*LoadAgentCluster) Stop ¶
func (c *LoadAgentCluster) Stop() error
Stop stops all the load-test agents available in the cluster.
type LoadAgentClusterConfig ¶
type LoadAgentClusterConfig struct { // Agents is a list of the load-test agents API endpoints to be used during // the load-test. It's length defines the number of load-test instances // used during a load-test. Agents []LoadAgentConfig `default_size:"1"` // MaxActiveUsers defines the upper limit of concurrently active users to run across // the whole cluster. MaxActiveUsers int `default:"1000" validate:"range:(0,]"` }
LoadAgentClusterConfig holds information regarding the cluster of load-test agents.
type LoadAgentConfig ¶
type LoadAgentConfig struct { // A sring that identifies the load-test agent instance. Id string `default:"lt0" validate:"notempty"` // The API URL used to control the specified load-test instance. ApiURL string `default:"http://localhost:4000" validate:"url"` }
LoadAgentConfig holds information about the load-test agent instance.