Documentation
¶
Overview ¶
Package doctor 提供只读运行环境诊断服务。
所有检查只读取受管根目录;doctor 不获取 mutation/backend 锁、不创建、 不修改也不删除任何持久化状态。网络、uv 版本与磁盘探测通过 Probes 注入, 单元测试不触碰真实公网或用户机器工具。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error 描述 doctor 服务失败,供 cli 会话框架映射协议四元组。 它实现 cli 侧消费方定义的 operationError 窄接口,是 doctor 与 cli 之间 唯一的失败契约:生产路径用于协议事件发射失败(见 newOutputError), cli 的注入式测试替身也用它构造服务级失败。
type Probes ¶
type Probes struct {
UVVersion func(ctx context.Context, exePath string) (string, error)
UVVersionWithLayout func(ctx context.Context, layout *config.Layout, exePath string) (string, error)
DiskFree func(ctx context.Context, path string) (uint64, error)
FileSystem func(ctx context.Context, path string) (string, error)
}
Probes 是 doctor 需要注入替身的只读探测点。
func ProductionProbesForLayout ¶
ProductionProbesForLayout 返回使用真实 managed runtime 目录的生产探针。
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service 组合布局与探针执行全部检查。