process

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 10 Imported by: 0

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

type CommandEnvEntry struct {
	Name  string
	Value string
}

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

type CommandResult struct {
	Stdout   []byte
	Stderr   []byte
	ExitCode int
}

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

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

Jump to

Keyboard shortcuts

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