feat: 重构前后端架构,添加Go后端和Python Agent服务
- 新增 Go 语言后端服务(server/),包含用户认证、Agent管理、数据库连接等API - 新增 Python Agent 服务(agent/),实现Agent核心逻辑和工具集 - 前端从原生HTML迁移到Vue.js框架(web/src/) - 添加 Docker Compose 支持(docker-compose.yml) - 添加项目架构文档(docs/ARCHITECTURE.md) - 添加环境变量示例(.env.example)和本地启动脚本(start-local.ps1) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
25
server/internal/model/system_info.go
Normal file
25
server/internal/model/system_info.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package model
|
||||
|
||||
// SystemInfo 系统信息
|
||||
type SystemInfo struct {
|
||||
CPU CPUInfo `json:"cpu"`
|
||||
Memory MemoryInfo `json:"memory"`
|
||||
}
|
||||
|
||||
// CPUInfo CPU信息
|
||||
type CPUInfo struct {
|
||||
Percent float64 `json:"percent"` // CPU使用率
|
||||
CoreCount int `json:"core_count"` // 核心数
|
||||
ModelName string `json:"model_name"` // CPU型号
|
||||
}
|
||||
|
||||
// MemoryInfo 内存信息
|
||||
type MemoryInfo struct {
|
||||
Total uint64 `json:"total"` // 总内存(字节)
|
||||
Used uint64 `json:"used"` // 已使用(字节)
|
||||
Available uint64 `json:"available"` // 可用(字节)
|
||||
Percent float64 `json:"percent"` // 使用率
|
||||
TotalGB float64 `json:"total_gb"` // 总内存(GB)
|
||||
UsedGB float64 `json:"used_gb"` // 已使用(GB)
|
||||
AvailableGB float64 `json:"available_gb"` // 可用(GB)
|
||||
}
|
||||
Reference in New Issue
Block a user