scheduler

package
v0.91.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 6 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph[T analyzer.BaseAnalyzer] struct {
	// contains filtered or unexported fields
}

Graph stores analyzers and their execution layers in dependency order.

func New

func New[T analyzer.BaseAnalyzer](analyzers []T) (*Graph[T], error)

New validates analyzers and creates a dependency graph.

func (*Graph[T]) Levels

func (g *Graph[T]) Levels() [][]string

Levels returns analyzer IDs grouped by dependency level.

func (*Graph[T]) Run

func (g *Graph[T]) Run(ctx context.Context, run RunFunc[T]) error

Run executes analyzers in dependency order and in parallel per level.

Execution is best-effort:

  • analyzer failures do not stop other independent analyzers
  • analyzers whose dependencies failed are skipped
  • all failures are returned as a single aggregated error

type RunFunc

type RunFunc[T analyzer.BaseAnalyzer] func(ctx context.Context, analyzer T) error

RunFunc is invoked for each analyzer when Graph.Run executes.

Jump to

Keyboard shortcuts

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