context

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 16 Imported by: 0 modules, 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

Overview

Package context is the context-controller's engine: it reacts to freshly opened Findings, runs the enhancer chain (CMDB ownership, infrastructure context — pkg/enhance plugins), records each contribution as an enrichment on the Finding's status, and advances Opened → Enhanced. It holds no tracking-system credential — projecting enrichments as issue comments is integration-controller work.

Enhancement is best-effort by design: a failing enhancer is logged and skipped, and the transition happens regardless — enrichment must never block the pipeline.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FindingReconciler

type FindingReconciler struct {
	client.Client
	// Enhancers run in order; each contributes at most one enrichment.
	Enhancers []enhance.Enhancer
	// Now is the clock seam; nil means time.Now.
	Now func() time.Time
	// Log receives diagnostics; nil discards.
	Log *slog.Logger
}

FindingReconciler runs the enhancer chain over freshly opened Findings — the CRD-native context-controller. It writes only Finding status (enrichments, owners, the ContextEnhanced condition, and the Opened→Enhanced edge); it holds no tracking-system credential — comments are integration-controller projection work.

func (*FindingReconciler) Reconcile

func (r *FindingReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile enhances one Finding.

func (*FindingReconciler) SetupWithManager

func (r *FindingReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager wires the reconciler.

Jump to

Keyboard shortcuts

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