Help us shape the future of Go! Take the 2026 Go Developer Survey

executor

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package executor provides concurrent task execution over a set of repositories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	Runner   runner.Runner
	MaxProcs int
	FailFast bool
	Timeout  time.Duration
	Stdout   io.Writer
	Stderr   io.Writer
}

Executor runs Tasks concurrently, limited to MaxProcs parallel goroutines. All task stdout/stderr are written to Stdout/Stderr respectively.

func (*Executor) Run

func (e *Executor) Run(ctx context.Context, tasks []Task) error

Run executes all tasks and waits for them to complete. When FailFast is true, the first error cancels the context and halts remaining tasks. All errors are collected and returned as a joined error.

type Task

type Task struct {
	Dir     string
	Command []string
}

Task represents a single unit of work: run Command in Dir.

Jump to

Keyboard shortcuts

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