executor

package
v2.0.0-...-00053fb Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package executor runs configured analyzer tools under host-owned limits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

Run isolates each analyzer's input and joins all started work. Findings and errors follow registration order.

func RunOne

RunOne isolates one invocation of a prepared registration, preserving partial findings and cancellation. Input kinds must match the set validated by Prepare.

func RunTasks

func RunTasks[T any](ctx context.Context, tasks []Task[T]) ([]T, error)

RunTasks joins independent analyses and combines outcomes in registration order. One failure does not cancel peers or discard completed findings.

func SourceInput

func SourceInput(document parsing.Document, path string, content []byte, reference sourcetext.Reference) checkinputs.AnalyzerInput

SourceInput constructs a check input header without execution facts.

func ValidateOptions

func ValidateOptions(schemaJSON, optionsJSON json.RawMessage) error

ValidateOptions checks provider options independently of transport. Schemas must bundle their refs; loading a plugin must never grant implicit filesystem or network reads.

Types

type PreparedRegistration

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

PreparedRegistration stores private copies of validated registration metadata. Its zero value cannot execute. Analyzer implementations are responsible for their own panics and concurrent access to their internal state.

func Prepare

func Prepare(registration results.AnalyzerRegistration, available []rule.InputKind) (PreparedRegistration, error)

Prepare validates a registration once for an exact set of available input kinds.

func PrepareForwarding

func PrepareForwarding(registration results.AnalyzerRegistration, available []rule.InputKind) (PreparedRegistration, error)

PrepareForwarding admits a transparent adapter's implementation through the same executor. Runtime errors use their existing text so an enclosing invocation can add its own analyzer context exactly once.

type Task

type Task[T any] func(context.Context) ([]T, error)

Task returns partial findings even when its analysis fails. It must finish child work before returning; cancellation is cooperative.

Directories

Path Synopsis
Package composites checks workflow and action invocations with prepared rules.
Package composites checks workflow and action invocations with prepared rules.
Package registration connects rule declarations to their check implementations and required inputs.
Package registration connects rule declarations to their check implementations and required inputs.

Jump to

Keyboard shortcuts

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