reposelection

package
v0.182.6 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package reposelection selects local repositories and dispatches bounded work. It has no CLI, process-global configuration or command-family dependencies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForEach

func ForEach(count, parallel int, run func(int))

ForEach calls run exactly once for each index in [0,count) and waits for all callbacks to finish. At most parallel callbacks run concurrently; parallel=1 runs directly in index order. Callbacks own separate indices and must protect any shared state. This function does not cancel or recover callback panics. Zero work returns regardless of parallel. Negative count or nonpositive parallel with nonempty work panics rather than deadlocking on zero workers.

func Match

func Match(repository, filter, glob string, expression *regexp.Regexp) bool

Match combines substring, glob and regular-expression repository filters. An invalid glob does not match; Select reports invalid syntax before discovery.

Types

type Request

type Request struct {
	Path, ProjectsRoot, Filter, Match, Regex string
	Fleet, AllowEmpty                        bool
	Parallel, Retry                          int
	Timeout                                  time.Duration
}

Request preserves selection and execution admission for current consumers.

type Target

type Target struct{ Repository, Path string }

func Select

func Select(request Request) ([]Target, error)

Select validates the request before resolving one path or discovering a fleet.

Jump to

Keyboard shortcuts

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