Documentation
¶
Overview ¶
Package runner orchestrates the execution of macnoise telemetry modules. It provides RunSingle for individual module execution, RunMany for sequential batch execution, and RunScenario for YAML-driven multi-step execution. When an audit.Logger is provided in Options, lifecycle records are written for each module run alongside the normal telemetry event stream.
Index ¶
- func RunMany(ctx context.Context, gens []module.Generator, params module.Params, ...) error
- func RunScenario(ctx context.Context, path string, emit module.EventEmitter, opts Options) error
- func RunSingle(ctx context.Context, gen module.Generator, params module.Params, ...) error
- type Options
- type Scenario
- type ScenarioStep
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunMany ¶
func RunMany(ctx context.Context, gens []module.Generator, params module.Params, emit module.EventEmitter, opts Options) error
RunMany sequentially executes each generator in gens, collecting errors without aborting early.
func RunScenario ¶
RunScenario loads the YAML scenario at path and executes its steps in order.
Types ¶
type Options ¶
type Options struct {
DryRun bool
// NoCleanup leaves module artifacts in place after Generate. Validation
// workflows need the installed artifact to persist so the persistence
// itself can be detected, not just the install event.
NoCleanup bool
Timeout time.Duration
Verbose bool
AuditLog *audit.Logger
}
Options controls module execution behaviour in RunSingle, RunMany, and RunScenario.
type Scenario ¶
type Scenario struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
AuditLog string `yaml:"audit_log,omitempty"`
Steps []ScenarioStep `yaml:"steps"`
}
Scenario is the top-level structure parsed from a scenario YAML file.
func LoadScenario ¶
LoadScenario reads and parses a YAML scenario file, returning an error if the file has no steps.