Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnknownTaskType is returned when a task has an unknown type. ErrUnknownTaskType = errors.New("unknown task type") )
Sentinel errors for task execution.
Functions ¶
Types ¶
type AtmosExecParams ¶
type AtmosExecParams struct {
// AtmosConfig is the atmos configuration.
AtmosConfig *schema.AtmosConfiguration
// Args are command arguments (e.g., ["terraform", "plan", "vpc"]).
Args []string
// Dir is the working directory for the command.
Dir string
// Env are environment variables for the command.
Env []string
// DryRun if true, don't actually execute the command.
DryRun bool
}
AtmosExecParams holds parameters for executing an atmos command.
type CommandRunner ¶
type CommandRunner interface {
// RunShell executes a shell command with the given parameters.
// Parameters:
// - ctx: Context for cancellation and timeout
// - command: The shell command to execute
// - name: A name for the command (for logging/identification)
// - dir: Working directory for the command
// - env: Environment variables for the command
// - dryRun: If true, don't actually execute the command
// Returns an error if the command fails.
RunShell(ctx context.Context, command, name, dir string, env []string, dryRun bool) error
// RunAtmos executes an atmos command with the given parameters.
// Returns an error if the command fails.
RunAtmos(ctx context.Context, params *AtmosExecParams) error
}
CommandRunner abstracts the execution of shell and atmos commands. This interface enables testing task execution without spawning real processes. It is designed to be compatible with pkg/workflow.CommandRunner.
type Options ¶
type Options struct {
// DryRun if true, commands are not actually executed.
DryRun bool
// Env are additional environment variables for the command.
Env []string
// Dir is the default working directory. Overridden by Task.WorkingDirectory.
Dir string
// AtmosConfig is the atmos configuration.
AtmosConfig *schema.AtmosConfiguration
// Stack overrides the task's stack setting (for command-line override).
Stack string
}
Options configures task execution.
Click to show internal directories.
Click to hide internal directories.