mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-21 01:18:08 +00:00
fix: 网络检测增强 + Tracker changeset 清理
网络检测 (monitor.go): - TCP 拨测 (8.8.8.8:53 / 1.1.1.1:53 / 208.67.222.222:53) - 延迟阈值检测 (>5s 标记降级) - DNS 多目标检测 (google/baidu/cloudflare) - NetworkCheckResult 新增 TCPReachable + LatencyDegraded Tracker: - 新增 WithKeepChangesets / WithMaxChangesetAge 选项 - Init 时自动清理过期 changeset (默认保留100份/30天) - 先按年龄裁剪,再按数量裁剪
This commit is contained in:
@ -46,10 +46,12 @@ type Heartbeat struct {
|
||||
}
|
||||
|
||||
type NetworkCheckResult struct {
|
||||
LLMAPIReachable bool `json:"llm_api_reachable"`
|
||||
DNSResolving bool `json:"dns_resolving"`
|
||||
LLMAPIReachable bool `json:"llm_api_reachable"`
|
||||
DNSResolving bool `json:"dns_resolving"`
|
||||
TCPReachable bool `json:"tcp_reachable"`
|
||||
Latency time.Duration `json:"latency_ms"`
|
||||
Error string `json:"error,omitempty"`
|
||||
LatencyDegraded bool `json:"latency_degraded"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
type SnapshotPolicy struct {
|
||||
|
||||
Reference in New Issue
Block a user