Versions in this module Expand all Collapse all v0 v0.1.0 Oct 18, 2026 Changes in this version + const DefaultKillGrace + const MaxPrefixLineBytes + var ErrInvalidCommand = errors.New("executor: invalid command") + var ErrInvalidSignal = errors.New("executor: invalid signal") + var ErrNilDependency = errors.New("executor: nil dependency") + var ErrNotStarted = errors.New("executor: process not started") + var ErrProcessExited = errors.New("executor: process exited") + var ErrUnsupportedAdoption = errors.New("executor: unsupported adoption") + func NewPrefixWriter(w io.Writer, prefix string) io.WriteCloser + type Command struct + Args []string + ClearEnv bool + Dir string + Env map[string]string + KillGrace time.Duration + MaxStderrBytes int64 + MaxStdoutBytes int64 + Path string + ProcessGroup bool + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + func Shell(script string) Command + func ShellWith(options ShellOptions, script string) Command + func (c Command) Clone() Command + func (c Command) Validate() error + type Executor interface + Run func(context.Context, Command) (Result, error) + Start func(context.Context, Command) (Process, error) + type ExitError struct + Cause error + Result Result + func (e *ExitError) Error() string + func (e *ExitError) Unwrap() error + type Process interface + Export func(context.Context) (handoff.Artifact, error) + Kill func(context.Context) error + Signal func(context.Context, string) error + Wait func(context.Context) (Result, error) + type Remote struct + func NewRemote(starter Starter) (*Remote, error) + func (*Remote) Adopt(context.Context, handoff.Artifact) (Process, error) + func (remote *Remote) Run(ctx context.Context, command Command) (Result, error) + func (remote *Remote) Start(ctx context.Context, command Command) (Process, error) + type Result struct + ExitCode int + FinishedAt time.Time + StartedAt time.Time + Stderr []byte + StderrTruncated bool + Stdout []byte + StdoutTruncated bool + Usage Usage + func RunAll(ctx context.Context, runner Executor, commands []Command, limit int) ([]Result, error) + type ShellOptions struct + Args []string + Path string + func DefaultShell() ShellOptions + type Starter interface + Start func(context.Context, Command) (Process, error) + type Usage struct + MaxRSSBytes int64 + ReadBytes int64 + SystemCPU time.Duration + UserCPU time.Duration + WriteBytes int64