Documentation
¶
Overview ¶
Package workflow provides shared orchestration logic for module discovery, filtering, dependency extraction, and graph building.
Index ¶
- func ApplyFilters(cfg *config.Config, ff *filter.Flags, modules []*discovery.Module) []*discovery.Module
- func MergedFilterOptions(cfg *config.Config, ff *filter.Flags) filter.Options
- func ResolveTargets(ctx context.Context, workDir string, cfg *config.Config, result *Result, ...) ([]*discovery.Module, error)
- type ChangeDetector
- type ChangeDetectorResolver
- type ModuleSet
- type Options
- type Result
- type TargetSelectionOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyFilters ¶ added in v0.10.0
func ApplyFilters(cfg *config.Config, ff *filter.Flags, modules []*discovery.Module) []*discovery.Module
ApplyFilters applies config and CLI filters to a module list.
func MergedFilterOptions ¶ added in v0.10.0
MergedFilterOptions merges config defaults with CLI filter flags.
Types ¶
type ChangeDetector ¶ added in v0.10.0
type ChangeDetector = plugin.ChangeDetectionProvider
ChangeDetector aliases plugin.ChangeDetectionProvider so target selection accepts any plugin implementing the change-detection capability without re-declaring the interface here.
type ChangeDetectorResolver ¶ added in v0.10.0
type ChangeDetectorResolver func() (ChangeDetector, error)
ChangeDetectorResolver resolves the change detection provider for changed-only target selection.
type ModuleSet ¶ added in v0.10.0
type ModuleSet struct {
Modules []*discovery.Module
Index *discovery.ModuleIndex
}
ModuleSet keeps a module slice and its lookup index together.
func NewModuleSet ¶ added in v0.10.0
NewModuleSet builds a consistent module collection and lookup index.
type Options ¶
type Options struct {
WorkDir string
Segments []string
Excludes []string
Includes []string
SegmentFilters map[string][]string
// LibraryPaths are project-relative roots whose discovered modules will be
// flagged Module.IsLibrary=true and routed into Result.Libraries instead
// of the executable target sets. Empty/nil disables the feature.
LibraryPaths []string
}
Options configures module discovery, filtering, and graph building.
type Result ¶
type Result struct {
// All contains every discovered module (executable + library), in scan
// order. Use Filtered for execution targets and Libraries for reporting.
All ModuleSet
// Filtered is the executable subset after filters; library modules are
// always excluded regardless of filters.
Filtered ModuleSet
// Libraries holds modules under any configured library_modules.paths.
// They are not included in Filtered and never become execution targets,
// but are tracked here for diagnostics (validate/graph).
Libraries ModuleSet
Graph *graph.DependencyGraph
Dependencies map[string]*parser.ModuleDependencies
Warnings []error
}
Result contains everything produced by the module workflow.
type TargetSelectionOptions ¶ added in v0.10.0
type TargetSelectionOptions struct {
ModulePath string
ChangedOnly bool
BaseRef string
Filters *filter.Flags
ChangeDetectorResolver ChangeDetectorResolver
}
TargetSelectionOptions controls how executable targets are selected from a workflow result.