scheduler

package
v0.82.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 6 Imported by: 0

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