Documentation ¶
Index ¶
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) (*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) 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 all the load-test agents available in the cluster. It differs from Stop() as it won't return early in case of an error. It makes sure agent.Stop() is called once for every agent in the cluster.
func (*LoadAgentCluster) Status ¶
func (c *LoadAgentCluster) Status() Status
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 []agent.LoadAgentConfig // MaxActiveUsers defines the upper limit of concurrently active users to run across // the whole cluster. MaxActiveUsers int }
LoadAgentClusterConfig holds information regarding the cluster of load-test agents.
func (LoadAgentClusterConfig) IsValid ¶ added in v1.7.0
func (c LoadAgentClusterConfig) IsValid() error
IsValid checks whether a LoadAgentClusterConfig is valid or not. Returns an error if the validation fails.