Documentation
¶
Overview ¶
Package runner executes VCS or shell commands across multiple repos in parallel, streaming results back through a channel as each completes.
Index ¶
- func Diff(ctx context.Context, repos map[string]config.Repo, names []string, ...) <-chan Result
- func Dispatch(ctx context.Context, repos map[string]config.Repo, names []string, ...) (<-chan Result, error)
- func GatherStatus(ctx context.Context, repos map[string]config.Repo, names []string, ...) <-chan StatusResult
- func Shell(ctx context.Context, repos map[string]config.Repo, names []string, ...) <-chan Result
- func Status(ctx context.Context, repos map[string]config.Repo, names []string, ...) <-chan Result
- func VCS(ctx context.Context, repos map[string]config.Repo, names []string, ...) <-chan Result
- func VCSArgs(ctx context.Context, repos map[string]config.Repo, names []string, ...) <-chan Result
- type Result
- type StatusResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Diff ¶
func Diff( ctx context.Context, repos map[string]config.Repo, names []string, concurrency int64, ) <-chan Result
Diff runs `git diff` or `jj diff` for each repo, streaming one Result per repo to the returned channel.
func Dispatch ¶
func Dispatch( ctx context.Context, repos map[string]config.Repo, names []string, backendName string, args []string, concurrency int64, ) (<-chan Result, error)
Dispatch runs args via backendName across the given repos, streaming one Result per repo to the returned channel. The channel is closed when all goroutines finish. The caller should drain the channel before inspecting the returned error (which reflects infrastructure failures only).
func GatherStatus ¶
func GatherStatus( ctx context.Context, repos map[string]config.Repo, names []string, concurrency int64, ) <-chan StatusResult
GatherStatus fetches the VCS status for each repo concurrently, streaming one StatusResult per repo to the returned channel.
func Shell ¶
func Shell( ctx context.Context, repos map[string]config.Repo, names []string, shellCmd string, concurrency int64, ) <-chan Result
Shell runs an arbitrary shell command across repos. It does not route through a backend; it uses sh -c directly.
func Status ¶
func Status( ctx context.Context, repos map[string]config.Repo, names []string, concurrency int64, ) <-chan Result
Status runs `git status` or `jj status` for each repo, streaming one Result per repo to the returned channel.
func VCS ¶
func VCS( ctx context.Context, repos map[string]config.Repo, names []string, subcmd string, concurrency int64, ) <-chan Result
VCS runs `<vcs> <subcmd>` (e.g. `git status`, `jj diff`) for each repo, streaming one Result per repo to the returned channel. The VCS binary is determined per-repo from its active backend.
Types ¶
type Result ¶
type Result struct {
RepoName string
RepoPath string
VCS string
Output string
ExitCode int
Err error
}
Result is the outcome for a single repo, sent through the results channel.
type StatusResult ¶
type StatusResult struct {
RepoName string
RepoPath string
VCS string
Status backend.RepoStatus
Err error
}
StatusResult carries the live status for a single repo used by `ll`.