fanout

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fanout runs Git jobs across repositories in a bounded rolling worker pool. Workers own each job's output buffers; only the calling goroutine writes scribe output and advances progress, in completion order.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Dir  string
	Name string
	Args []string
}

Job is a single Git invocation. Dir is the working directory, empty for the current one; Name identifies the job in output and errors and defaults to Dir.

func Jobs

func Jobs(dirs []string, args []string) []Job

Jobs builds one job per directory, all running the same arguments.

type Result

type Result struct {
	Index  int
	Job    Job
	Stdout bytes.Buffer
	Stderr bytes.Buffer
	Err    error
}

Result holds the captured output of a Job. Index is the job's position in the slice passed to Run.

func Run

func Run(ctx context.Context, scrb scribe.Scriber, label string, jobs []Job, limit int) ([]*Result, error)

Run executes jobs with at most limit Git processes active at once. Failures do not stop other jobs; they are joined into the returned error. Cancellation kills active Git process trees and skips queued jobs. Results are returned in completion order.

Jump to

Keyboard shortcuts

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