3588AdminBackend/plan.md
2026-02-25 11:00:55 +08:00

36 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Manager Backend (Go) 开发计划
## 阶段 1核心模型与设备发现 (Discovery & Registry) [DONE]
- [x] 定义核心数据结构 (`Device`, `Registry`, `Task`)
- [x] 实现 UDP 广播发现逻辑 (`Discovery`模块)
- [x] 实现内存设备注册表,支持并发安全与离线判定 (`Registry` 模块)
- [x] 暴露基础 API`POST /api/discovery/search` 和 `GET /api/devices`
## 阶段 2设备客户端与代理操作 (Device Client & Action Proxy) [DONE]
- [x] 实现统一的 `AgentClient`用于与 `rk3588-agent` 通信
- [x] 实现代理接口:`reload`, `rollback`, `graphs`, `logs`
- [x] 实现单台设备的 `config/apply`
## 阶段 3任务运行器与 SSE 推送 (Task Runner & SSE) [DONE]
- [x] 实现任务调度逻辑,支持并发控制 (Concurrency)
- [x] 实现 SSE (`/api/tasks/:id/events`) 实时推送任务状态
- [x] 支持批量 `config_apply` 任务
## 阶段 4模板管理与配置生成 (Templates & Config) [DONE]
- [x] 实现内置/本地模板读取
- [x] 实现基于模板的 Root Config 生成逻辑
## 阶段 5文件操作与持久化 (Model Upload & Persistence) [DONE]
- [x] 实现 `model_upload` 转发逻辑
- [x] (可选) 实现 Registry 的本地 JSON 持久化,防止重启丢失
## 阶段 6系统集成与完善 [DONE]
- [x] 整合所有模块并进行最终测试
- [x] 优化错误码返回,确保符合 PRD 规范