Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool manages parallel task execution using isolated git worktrees.
func NewPool ¶
NewPool creates a parallel execution pool rooted at the given git repo. maxWorkers caps the number of concurrent goroutines; if <= 0 it defaults to 4.
func (*Pool) AddTask ¶
AddTask queues a task for parallel execution and returns it. The task ID and branch name are auto-generated.
func (*Pool) Run ¶
func (p *Pool) Run(ctx context.Context, workFn func(ctx context.Context, worktreePath string, task *Task) (string, error)) error
Run executes all queued tasks in parallel, each in its own git worktree. workFn receives the worktree path and task, and returns a result summary. Tasks that fail do not prevent other tasks from completing.
type Task ¶
type Task struct {
ID string
Description string
Branch string // auto-generated branch name: hawk-parallel/{ID}
WorktreePath string // filesystem path to the worktree
Status Status
Error error
Result string // summary of what was done
}
Task represents a single unit of work that will execute in its own git worktree.
Click to show internal directories.
Click to hide internal directories.