Documentation
¶
Overview ¶
Package common defines minimal runner interfaces to allow multiple implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
Apply(stack StackRunner)
}
Option applies configuration to a StackRunner.
func WithParseOptions ¶
WithParseOptions provides custom HCL parser options to both discovery and stack execution.
func WithWorktrees ¶ added in v0.95.0
WithWorktrees provides git worktrees to discovery for git filter expressions.
type ParseOptionsProvider ¶ added in v0.87.4
ParseOptionsProvider exposes HCL parser options carried by an Option.
type StackRunner ¶
type StackRunner interface {
// Run executes all units in the stack according to the specified Terraform command and options.
Run(ctx context.Context, l log.Logger, opts *options.TerragruntOptions, r *report.Report) error
// LogUnitDeployOrder logs the order in which units will be deployed.
LogUnitDeployOrder(l log.Logger, isDestroy bool, showAbsPaths bool, experiments experiment.Experiments) error
// JSONUnitDeployOrder returns the deployment order of units as a JSON string.
JSONUnitDeployOrder(isDestroy bool, showAbsPaths bool) (string, error)
// ListStackDependentUnits returns a map of each unit to the list of units that depend on it.
ListStackDependentUnits() map[string][]string
// GetStack retrieves the underlying Stack object managed by this runner.
GetStack() *component.Stack
}
StackRunner is the abstraction for running a stack of units. Implemented by runnerpool.Runner and any alternate runner implementations.
type UnitRunner ¶
type UnitRunner struct {
Err error
Unit *component.Unit
Status UnitStatus
}
UnitRunner handles the logic for running a single component.Unit.
func NewUnitRunner ¶
func NewUnitRunner(unit *component.Unit) *UnitRunner
NewUnitRunner creates a UnitRunner from a component.Unit.
type UnitStatus ¶
type UnitStatus int
UnitStatus represents the status of a unit during execution.
const ( Waiting UnitStatus = iota Running Finished )
type WorktreeOption ¶ added in v0.95.0
WorktreeOption carries worktrees through the runner pipeline for git filter expressions.
func (WorktreeOption) Apply ¶ added in v0.95.0
func (o WorktreeOption) Apply(stack StackRunner)
Apply is a no-op for runner (worktrees are used in discovery, not runner execution).