concurrent

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	Config     *yamlspec.ConcurrentConfig
	BaseRunner TestRunner
	Logger     *logger.Logger
}

Runner executes test steps concurrently with multiple workers

func NewRunner

func NewRunner(config *yamlspec.ConcurrentConfig, baseRunner TestRunner, logger *logger.Logger) *Runner

NewRunner creates a new concurrent test runner

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, steps []yamlspec.TestStep) error

Run executes test steps with multiple workers

type TestRunner

type TestRunner interface {
	// RunSteps executes multiple test steps sequentially
	RunSteps(ctx context.Context, steps []yamlspec.TestStep) error
	// Clone creates an independent copy of the runner for concurrent execution
	Clone() interface{}
}

TestRunner interface that both TCP and HTTP runners must implement

type WorkerResult

type WorkerResult struct {
	WorkerID int
	Error    error
	Duration time.Duration
}

WorkerResult holds the result of a worker execution

Jump to

Keyboard shortcuts

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