coordinator

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 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 Coordinator

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

Coordinator represents a load-test coordinator. It exposes methods to manage a load-test coordinator resource through API.

func New

func New(id, serverURL string, client *http.Client) (*Coordinator, error)

New creates and initializes a new instance of Coordinator. Returns an error in case of failure.

func (*Coordinator) Create

func (c *Coordinator) Create(coordConfig *coordinator.Config, ltConfig *loadtest.Config) (coordinator.Status, error)

Create creates a new coordinator resource with the given configs. Returns the coordinator status or an error in case of failure.

func (*Coordinator) Destroy

func (c *Coordinator) Destroy() (coordinator.Status, error)

Destroy stops (if running) and destroys the coordinator resource. Returns the coordinator status or an error in case of failure.

func (*Coordinator) Id

func (c *Coordinator) Id() string

Id returns the unique identifier for the coordinator resource.

func (*Coordinator) InjectAction added in v1.10.0

func (c *Coordinator) InjectAction(actionID string) (coordinator.Status, error)

InjectAction injects an action that is run once, at the next possible opportunity. The action is injected into all agents for this coordinator.

func (*Coordinator) Run

func (c *Coordinator) Run() (coordinator.Status, error)

Run starts the coordinator. Returns the coordinator status or an error in case of failure.

func (*Coordinator) Status

func (c *Coordinator) Status() (coordinator.Status, error)

Status retrieves and returns the status for the load-test agent. It also returns an error in case of failure.

func (*Coordinator) Stop

func (c *Coordinator) Stop() (coordinator.Status, error)

Stop stops the coordinator. Returns the coordinator status or an error in case of failure.

type CoordinatorResponse

type CoordinatorResponse struct {
	Id      string              `json:"id,omitempty"`      // The load-test coordinator unique identifier.
	Message string              `json:"message,omitempty"` // Message contains information about the response.
	Status  *coordinator.Status `json:"status,omitempty"`  // Status contains the current status of the coordinator.
	Error   string              `json:"error,omitempty"`   // Error is set if there was an error during the operation.
}

CoordinatorResponse contains the data returned by load-test coordinator API.

Jump to

Keyboard shortcuts

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