explain

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package explain provides operator-facing explanations for Fleetsweeper findings and scanners. Keys map to rich descriptions covering what a finding means, how Fleetsweeper computes its severity, suggested investigation paths, and related signals. The `fleetsweeper why` subcommand reads from this map.

Adding a new entry is intentionally lightweight: append a Topic literal to topics() and the CLI surfaces it automatically.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keys

func Keys() []string

Keys returns every key in alphabetical order.

func Render

func Render(t Topic, color bool) string

Render returns a plain-text explainer for the topic. When color is true, section headings get ANSI dim/bright codes for terminal readability.

Types

type Topic

type Topic struct {
	// Key is the lookup token, e.g. "node-health", "version-skew", "fleet-score".
	Key string
	// Aliases are additional tokens that resolve to this entry.
	Aliases []string
	// Title is the human-readable heading.
	Title string
	// Summary is a single-paragraph plain-English explanation.
	Summary string
	// Severity describes how Fleetsweeper assigns critical/warning/info.
	Severity string
	// HowComputed describes the data path that produces the finding.
	HowComputed string
	// Remediation lists the recommended fixes, in priority order.
	Remediation []string
	// Probes lists kubectl-or-similar commands to investigate locally.
	Probes []string
	// Related lists other topic keys an operator may want to read next.
	Related []string
}

Topic is the explainer entry for one scanner, finding family, or concept.

func Lookup

func Lookup(key string) *Topic

Lookup returns the topic matching key (case-insensitive), or nil. Falls back to substring matching against titles when the exact key is not found, so misspellings or shortened forms still hit.

Jump to

Keyboard shortcuts

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