Documentation
¶
Index ¶
- Constants
- func HasFailures(results []CheckResult) bool
- func PrintJSON(results []CheckResult) error
- func PrintResults(results []CheckResult, verbose bool)
- type CheckResult
- func CheckConfig(cfg *config.Config, loadErr error) []CheckResult
- func CheckEmbeddings(cfg *config.Config) []CheckResult
- func CheckEnv(cfg *config.Config) []CheckResult
- func CheckLLM(ctx context.Context) []CheckResult
- func CheckOpik(ctx context.Context) []CheckResult
- func CheckStack() []CheckResult
- func CheckSystem() []CheckResult
- func CheckVDB(ctx context.Context, cfg *config.Config) []CheckResult
- type Doctor
- type DoctorConfig
- type Status
Constants ¶
const ( SectionSystem = "system" SectionConfig = "config" SectionEnv = "env" SectionVDB = "vdb" SectionLLM = "llm" SectionEmbeddings = "embeddings" SectionStack = "stack" SectionOpik = "opik" )
SectionName constants used as keys across the codebase.
Variables ¶
This section is empty.
Functions ¶
func HasFailures ¶
func HasFailures(results []CheckResult) bool
HasFailures returns true if any result is StatusFail.
func PrintJSON ¶
func PrintJSON(results []CheckResult) error
PrintJSON outputs results as a JSON object to stdout.
func PrintResults ¶
func PrintResults(results []CheckResult, verbose bool)
PrintResults renders all check results to the terminal, grouped by section. When verbose is false only non-OK results and section headers with issues are shown.
Types ¶
type CheckResult ¶
type CheckResult struct {
Section string `json:"section"` // e.g. "config", "vdb", "llm"
Name string `json:"name"` // e.g. "Config file", "milvus-local connectivity"
Status Status `json:"status"` // OK, WARN, FAIL, SKIP
Message string `json:"message"` // Human-readable detail
Fix string `json:"fix,omitempty"` // Suggested remediation command or action
Latency string `json:"latency,omitempty"` // Optional latency measurement
}
CheckResult holds the outcome of a single diagnostic check.
func CheckConfig ¶
func CheckConfig(cfg *config.Config, loadErr error) []CheckResult
CheckConfig verifies that the config file exists, is parseable, and validates cleanly. cfg may be nil if loading failed; the caller should pass the error in loadErr.
func CheckEmbeddings ¶
func CheckEmbeddings(cfg *config.Config) []CheckResult
CheckEmbeddings validates that configured embedding models are in the registry and that their dimensions match the VDB configuration.
func CheckEnv ¶
func CheckEnv(cfg *config.Config) []CheckResult
CheckEnv audits environment variables required by the current configuration.
func CheckLLM ¶
func CheckLLM(ctx context.Context) []CheckResult
CheckLLM validates the OpenAI API key and tests a small embedding call.
func CheckOpik ¶
func CheckOpik(ctx context.Context) []CheckResult
CheckOpik tests connectivity to the Opik workspace if OPIK_API_KEY is set.
func CheckStack ¶
func CheckStack() []CheckResult
CheckStack verifies the weave stack status: cluster info, pod status, and VDB reachability.
func CheckSystem ¶
func CheckSystem() []CheckResult
CheckSystem verifies CLI version, Go version, OS/arch, and external dependencies.
type Doctor ¶
type Doctor struct {
// contains filtered or unexported fields
}
Doctor orchestrates all diagnostic checks.
type DoctorConfig ¶
type DoctorConfig struct {
Fix bool // Attempt to auto-fix fixable issues
Section string // Run only this section ("" = all)
JSON bool // Machine-readable JSON output
Verbose bool // Show passing checks too
}
DoctorConfig controls which sections to run and output behaviour.
type Status ¶
type Status int
Status represents the outcome of a single diagnostic check.
func (Status) MarshalJSON ¶
MarshalJSON encodes the status as a JSON string (e.g. "OK", "FAIL").