orchestrator

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadDispatch = errors.New("ctx, linter and regexp must be provided")

ErrBadDispatch is returned when a dispatcher is created with bad parameters

Functions

This section is empty.

Types

type Job

type Job struct {
	// contains filtered or unexported fields
}

Job is a single job to be run by the orchestrator

type JobOrchestrator

type JobOrchestrator struct {
	// contains filtered or unexported fields
}

JobOrchestrator is responsible for dispatching jobs to dispatchers

func New

func New(files []string, reporter linter.Reporter, locking, failFast bool) *JobOrchestrator

New creates a new JobOrchestrator locking decides if we should have an exclusive lock per file due to potential writes

func (*JobOrchestrator) CreateDispatcher

func (d *JobOrchestrator) CreateDispatcher(ctx context.Context, l linter.Linter, reg *regexp.Regexp, groupBy string) error

CreateDispatcher submits jobQ to the dispatchers. If groupBy is non-empty, matched files are grouped by nearest ancestor directory containing the named marker file (e.g. "go.mod"), and the linter runs once per group.

func (*JobOrchestrator) Start

func (d *JobOrchestrator) Start(ctx context.Context) func() error

Start starts the orchestrator

Jump to

Keyboard shortcuts

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