Versions in this module Expand all Collapse all v0 v0.0.4 Nov 26, 2026 Changes in this version + const MaxLogDiskBytes + const MaxLogMemBytes + var ErrInputUnsupported = errors.New("tasks: task does not read standard input") + var ErrNotRunning = errors.New("tasks: task is not running") + var ErrTaskNotFound = errors.New("tasks: task not found") + type Config struct + Context context.Context + OnUpdate func(api.Task) + OutputsDir string + type Func func(ctx context.Context, output io.Writer, stdin io.Reader) (exitCode int, err error) + type Store interface + Add func(task *Task) error + Close func() error + Get func(id string) (*Task, bool) + List func() []api.Task + func New(cfg Config) Store + type Task struct + AcceptsInput bool + Command string + Fn Func + ID string + Kind string + Title string + Wait time.Duration + func (t *Task) Backgrounded() bool + func (t *Task) Cancel() + func (t *Task) Done() <-chan struct{} + func (t *Task) Duration() time.Duration + func (t *Task) Err() error + func (t *Task) ExitCode() int + func (t *Task) Kill() error + func (t *Task) LogPath() string + func (t *Task) Run(ctx context.Context) error + func (t *Task) Snapshot() api.Task + func (t *Task) Status() api.TaskStatus + func (t *Task) SubscribeOutput() (<-chan string, string, func()) + func (t *Task) Tail(maxLines int) (string, error) + func (t *Task) Write(p []byte) (n int, err error) + func (t *Task) WriteInput(data string) error