Documentation
¶
Overview ¶
Package preflight provides reusable non-mutating checks for validating a host and agent configuration before bootstrap.
Index ¶
- type Checker
- type Options
- type Report
- type Result
- func Error(name, target, message string, args ...any) Result
- func OK(name, target, message string) Result
- func Results(results ...Result) []Result
- func ResultsError(name, target, message string, args ...any) []Result
- func ResultsOK(name, target, message string) []Result
- func ResultsWarning(name, target, message string, args ...any) []Result
- func Warning(name, target, message string, args ...any) Result
- type Severity
- type Summary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Report ¶
type Report struct {
Status string `json:"status"`
Checks []Result `json:"checks"`
Summary Summary `json:"summary"`
}
Report is the complete preflight output for both text and JSON consumers.
func (Report) HasWarnings ¶
HasWarnings reports whether the report contains any warnings.
type Result ¶
type Result struct {
Name string `json:"name"`
Target string `json:"target"`
Severity Severity `json:"severity"`
Message string `json:"message"`
Ignored bool `json:"ignored"`
}
Result describes one preflight check outcome. Message and Target must not include raw configured values such as URLs, tokens, image references, or file contents.
func Error ¶
Error returns a fatal check result. When args are provided, message is formatted with fmt.Sprintf.
func ResultsError ¶
ResultsError returns a single fatal check result as a slice. When args are provided, message is formatted with fmt.Sprintf.
func ResultsWarning ¶
ResultsWarning returns a single warning check result as a slice. When args are provided, message is formatted with fmt.Sprintf.
type Severity ¶
type Severity string
const ( // SeverityOK indicates the check completed successfully. SeverityOK Severity = "ok" // SeverityWarning indicates the check found a condition that bootstrap can // usually remediate or that does not necessarily block bootstrap. SeverityWarning Severity = "warning" // SeverityError indicates the check found a fatal condition that should block // bootstrap unless explicitly ignored. SeverityError Severity = "error" )