Documentation
¶
Overview ¶
Package coordinator implements the Pulse distributed coordinator. It fans out RunRequests to a set of worker addresses, waits for all workers to complete, and merges their WorkerResults into a single metrics.Result.
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 fans out load-test runs to multiple workers and merges results.
func New ¶
func New(workers []string) *Coordinator
New creates a Coordinator that will distribute runs to the given worker addresses. Each address must be in "host:port" format.
func (*Coordinator) Ping ¶
func (c *Coordinator) Ping(ctx context.Context) error
Ping checks that all workers are reachable and returns an error listing any that did not respond with {"status":"ok"}. Use before Run to validate the worker fleet before committing to a long load test.
func (*Coordinator) Run ¶
func (c *Coordinator) Run(ctx context.Context, req distributed.RunRequest) (metrics.Result, error)
Run fans out req to all workers concurrently, waits for all to complete, and returns the merged metrics.Result. If any worker fails, the first error is returned alongside any partial results from workers that succeeded.