Skip to main content

Module diagnostics

Module diagnostics 

Source
Expand description

Runtime diagnostics produced by Kubernetes and CRD schema lookup.

Structs§

DiagnosticSink
Thread-safe sink for Diagnostic events keyed by DiagnosticKey. Uses BTreeMap so iteration order is deterministic (driven by DiagnosticKey’s Ord) independent of insertion order. First writer per key wins; canonicalisation at insertion time means payloads for the same key are identical by construction.

Enums§

Diagnostic
User-facing diagnostic. Every event helm-schema emits at runtime is one of these. Diagnostic::key produces the deduplication key.
DiagnosticKey
Identity key used to dedupe diagnostics. Diagnostics with the same key are considered “the same logical event”; only the first one inserted into a crate::diagnostic::DiagnosticSink is kept.

Functions§

format_diagnostic_json
Serialize a Diagnostic to a single-line JSON string. Tagged discriminated union (#[serde(tag = "type")]) keeps the shape stable across versions. Returns None only on JSON serialization failure, which should never happen for the variants we own.
format_diagnostic_text
Render a Diagnostic as a human-readable line. Returns "warning: …" for diagnostics representing problems, "info: …" for diagnostics describing successful but noteworthy outcomes.