config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package config holds the harness's flag-bound application config. It reads Cobra flags via a small registry and exposes a single App struct consumed by the runner.

Index

Constants

View Source
const (
	FailFastOnAny     = "any"
	FailFastOnFailure = "failure"
	FailFastOnTimeout = "timeout"
	FailFastOnSlow    = "slow"
)

Valid values for --fail-fast-on.

Variables

This section is empty.

Functions

func NormalizeFailFastOn

func NormalizeFailFastOn(values []string) ([]string, error)

NormalizeFailFastOn validates --fail-fast-on values and returns lowercase, de-duplicated categories in first-seen order.

func ValidateDiagnose

func ValidateDiagnose(conf *App) error

ValidateDiagnose checks diagnose-mode invariants on conf and normalizes FailFastOn in place. Call after Load.

Types

type App

type App struct {
	RepoRoot           string
	AIOutput           bool
	Iterations         int
	ParallelIterations int
	SlowThreshold      time.Duration
	FailFast           bool
	FailFastOn         []string
	Shuffle            bool
	IterationSetup     string
	IterationTeardown  string
	// contains filtered or unexported fields
}

App is the flag-bound configuration shared across testrig subcommands.

func Load

func Load(cmd *cobra.Command) (*App, error)

Load reads the active command's flags into App.

func (*App) ShellCommand

func (a *App) ShellCommand(flag string) string

ShellCommand returns the shell command bound to a catalog flag (e.g. iteration-setup).

Jump to

Keyboard shortcuts

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