multiplex

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 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 Multiplexer

type Multiplexer struct {
	Runner      execx.Runner
	MaxParallel int
	Logf        logFn
	RunSession  runSessionFn
}

Multiplexer runs many harness sessions concurrently.

func New

func New(runner execx.Runner) Multiplexer

New returns a multiplexer with safe defaults.

func (Multiplexer) Run

func (m Multiplexer) Run(ctx context.Context, configPaths []string) Result

Run executes all configs with bounded parallelism.

type Result

type Result struct {
	Sessions []Session
}

Result is the aggregated outcome of a multiplex run.

func (Result) ExitCode

func (r Result) ExitCode() int

ExitCode returns the first non-zero exit code, if any.

type Session

type Session struct {
	ID           string
	ConfigPath   string
	State        SessionState
	Stage        string
	StageStatus  string
	ExitCode     int
	Error        string
	WorkspaceDir string
	Branch       string
	PRURL        string
	NoChanges    bool
}

Session captures status and output metadata for one config execution.

type SessionState

type SessionState string

SessionState describes the current state of one multiplexed task.

const (
	SessionQueued    SessionState = "queued"
	SessionRunning   SessionState = "running"
	SessionOK        SessionState = "ok"
	SessionNoChanges SessionState = "no_changes"
	SessionError     SessionState = "error"
)

Jump to

Keyboard shortcuts

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