Documentation
¶
Overview ¶
Package diag implements `kubetective doctor` (issue #2, v1.0 checklist): a read-only environment preflight. Every check reports OK, WARN, or FAIL with a human fix hint; the command exits non-zero only on failures.
Checks never mutate anything: kubeconfig is loaded read-only, the store is listed read-only, and optional sources (Prometheus, Loki) are probed with a GET only when configured.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check struct {
Name string `json:"name"`
Level Level `json:"level"`
Detail string `json:"detail,omitempty"`
}
Check is one doctor finding.
type Options ¶
type Options struct {
Settings config.Settings // kubetective.yaml contents
// SettingsErr is the yaml parse error (nil when absent or clean).
SettingsErr error
// SettingsMissing marks a missing file: WARN (optional file), not FAIL.
SettingsMissing bool
// StateDir is the KubeTective home (default via config.DefaultDir).
StateDir string
// ConfigPath is config.json for calibration state.
ConfigPath string
// PrometheusURL/LokiURL from settings/env ("" = not configured -> OK).
PrometheusURL string
LokiURL string
// HubCheck verifies kubeconfig/cluster; when nil the kubeconfig check
// only verifies the file exists.
HubCheck func(ctx context.Context) error
}
Options control which checks run. Zero-ish values degrade gracefully.
Click to show internal directories.
Click to hide internal directories.