Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeCommandEnv ¶
func MergeCommandEnv(base []string, overlays ...[]CommandEnvEntry) []string
Types ¶
type CommandEnvEntry ¶
func CommandEnvEntriesFromMap ¶
func CommandEnvEntriesFromMap(envVars map[string]string) []CommandEnvEntry
type CommandRequest ¶
type CommandRequest = interfaces.SubprocessExecutionRequest
CommandRequest describes one worker-owned subprocess invocation.
func SubprocessRequestBase ¶
func SubprocessRequestBase(dispatch interfaces.WorkDispatch) CommandRequest
type CommandResult ¶
CommandResult captures the observable output and exit status from a command.
type CommandRunner ¶
type CommandRunner interface {
Run(ctx context.Context, req CommandRequest) (CommandResult, error)
}
CommandRunner executes a low-level subprocess request for worker code.
func CommandRunnerWithLogging ¶
func CommandRunnerWithLogging(runner CommandRunner, logger logging.Logger) CommandRunner
type ExecCommandRunner ¶
type ExecCommandRunner struct{}
ExecCommandRunner implements CommandRunner by delegating to os/exec.
func (ExecCommandRunner) Run ¶
func (ExecCommandRunner) Run(ctx context.Context, req CommandRequest) (CommandResult, error)
Run executes the command with process-tree cancellation, capturing stdout and stderr.
type LoggingCommandRunner ¶
type LoggingCommandRunner struct {
Runner CommandRunner
Logger logging.Logger
}
LoggingCommandRunner emits structured work-scoped records around a CommandRunner request while preserving the wrapped runner's behavior.
func (LoggingCommandRunner) Run ¶
func (r LoggingCommandRunner) Run(ctx context.Context, req CommandRequest) (CommandResult, error)
Click to show internal directories.
Click to hide internal directories.