Versions in this module Expand all Collapse all v0 v0.2.0 Sep 21, 2026 v0.1.0 Sep 21, 2026 Changes in this version + const DefaultDynamicOutputLimit + const DefaultKillGrace + const DefaultMaxCallDepth + const DefaultMaxExpansions + var ErrDependencyCycle = errors.New("taskrun: task dependency cycle") + var ErrExit = errors.New("taskrun: non-zero exit") + var ErrExpansionLimit = errors.New("taskrun: task call expansion limit exceeded") + var ErrHandler = errors.New("taskrun: handler failed") + var ErrIO = errors.New("taskrun: io failure") + var ErrInvalidDefinition = errors.New("taskrun: invalid definition") + var ErrInvalidRequest = errors.New("taskrun: invalid request") + var ErrNotFound = errors.New("taskrun: task not found") + var ErrOutputLimit = errors.New("taskrun: output limit exceeded") + var ErrStart = errors.New("taskrun: program start failed") + type ActionResult struct + ErrorOutput []byte + ExitCode *int + Output []byte + Started bool + Truncated bool + type Definition struct + BaseDir string + Env map[string]string + EnvPaths []string + Files map[string]ScriptFile + Sources []Source + Tasks map[string]Task + Vars map[string]any + Version int + type DynamicVar struct + Exec *ExecSpec + File *FileSpec + Shell *ShellSpec + type Engine interface + Execute func(ctx context.Context, action PreparedAction, streams IO) (ActionResult, error) + type ErrorKind string + const ErrKindCanceled + const ErrKindExit + const ErrKindExpansionLimit + const ErrKindHandler + const ErrKindIO + const ErrKindInvalidDefinition + const ErrKindInvalidRequest + const ErrKindLoad + const ErrKindNotFound + const ErrKindOutputLimit + const ErrKindStart + const ErrKindTimedOut + type Event struct + ActionKind string + CallID string + Depth int + Dir string + Err error + ExitCode *int + Kind EventKind + Reason string + Status Status + Step string + Task string + Time time.Time + type EventKind string + const EventRunFinished + const EventRunStarted + const EventStepFinished + const EventStepSkipped + const EventStepStarted + const EventTaskFinished + const EventTaskSkipped + const EventTaskStarted + type ExecSpec struct + Args []string + Program string + type FileSpec struct + Args []string + Name string + type Handler func(context.Context, HostCall) (ActionResult, error) + type HostCall struct + Args []any + Dir string + Env map[string]string + Name string + Vars map[string]any + type HostSpec struct + Args []any + Name string + type IO struct + CaptureLimit int64 + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + type Interpreter struct + PrefixArgs []string + Program string + type Observer func(Event) + type Option func(*runnerConfig) error + func WithBaseEnv(env map[string]string) Option + func WithDynamicOutputLimit(limit int64) Option + func WithEngine(engine Engine) Option + func WithHandler(name string, handler Handler) Option + func WithKillGrace(grace time.Duration) Option + func WithMaxCallDepth(depth int) Option + func WithMaxExpansions(limit int) Option + func WithObserver(observer Observer) Option + type Plan struct + Actions []PlannedAction + Deferred []string + Skipped []string + Task string + type PlannedAction struct + Args []string + CallID string + Dir string + EnvKeys []string + Kind string + Program string + Reason string + Script string + Status Status + Step string + Task string + type PreparedAction struct + Args []string + Dir string + Env []string + Kind string + Program string + Script string + type ProcessEngine struct + TreeKill TreeKillMode + func (e ProcessEngine) Execute(ctx context.Context, action PreparedAction, streams IO) (ActionResult, error) + type ProcessError struct + Err error + ExitCode *int + Kind ErrorKind + Started bool + func (e *ProcessError) Error() string + func (e *ProcessError) Is(target error) bool + func (e *ProcessError) Unwrap() error + type Request struct + Args []string + Dir string + DryRun bool + Env map[string]string + HostData map[string]any + IO IO + Task string + Vars map[string]any + type Result struct + EndedAt time.Time + Plan *Plan + StartedAt time.Time + Status Status + Steps []StepResult + Task string + Tasks []TaskResult + type RunError struct + CallID string + Err error + Kind ErrorKind + Source string + Step string + Task string + func (e *RunError) Error() string + func (e *RunError) Is(target error) bool + func (e *RunError) Unwrap() error + type Runner struct + func New(def Definition, opts ...Option) (*Runner, error) + func (r *Runner) Inspect(ctx context.Context, req Request) (Plan, error) + func (r *Runner) List() []Task + func (r *Runner) Lookup(name string) (Task, error) + func (r *Runner) Run(ctx context.Context, req Request) (*Result, error) + func (r *Runner) Source() []Source + type ScriptFile struct + Args []string + Dir string + Env map[string]string + Interpreter Interpreter + Name string + Path string + type ShellSpec struct + Name string + PrefixArgs []string + Script string + type Source struct + BaseDir string + Format string + Name string + type Status string + const StatusCanceled + const StatusDeferred + const StatusDryRun + const StatusFailed + const StatusIgnoredFailure + const StatusPlanned + const StatusSkipped + const StatusSucceeded + const StatusSucceededWithWarnings + const StatusTimedOut + type Step struct + Dir string + DynamicVars map[string]DynamicVar + Env map[string]string + EnvPaths []string + Exec *ExecSpec + File *FileSpec + Host *HostSpec + If string + IgnoreError bool + Name string + Platform []string + Shell *ShellSpec + Task *TaskCall + Timeout time.Duration + Vars map[string]any + type StepResult struct + CallID string + EndedAt time.Time + Err error + ErrorOutput []byte + ExitCode *int + Kind string + Name string + Output []byte + Started bool + StartedAt time.Time + Status Status + Truncated bool + type Task struct + CleanEnv bool + Deps []string + Desc string + Dir string + DynamicVars map[string]DynamicVar + Env map[string]string + EnvPaths []string + If string + Name string + Platform []string + Steps []Step + Timeout time.Duration + Vars map[string]any + type TaskCall struct + Args []string + ForwardArgs bool + Name string + type TaskResult struct + CallID string + EndedAt time.Time + Err error + Name string + Reason string + StartedAt time.Time + Status Status + type TreeKillMode int + const TreeKillAuto + const TreeKillRequired