This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# 架构决策记录
|
||||
|
||||
## goroutine context 设计(已确认)
|
||||
- 必须使用 `context.WithTimeout(context.Background(), 3*time.Second)` 创建独立 context
|
||||
- 禁止复用 `c.UserContext()`(Fiber 请求 context 在 handler 返回后立即失效)
|
||||
- goroutine 只接受标量参数(uint、string),不捕获 *fiber.Ctx 或任何指针
|
||||
|
||||
## 系统用户身份(已确认)
|
||||
- 使用 `UserTypePlatform` 而非 `UserTypeSuperAdmin`
|
||||
- Platform 用户仍受 500次/天日限制约束
|
||||
- SuperAdmin 不受日限制约束(不符合要求)
|
||||
|
||||
## 配置结构体命名(已确认)
|
||||
- 新增 `PollingAutoTriggerConfig` 结构体
|
||||
- Config 中字段名:`PollingAutoTrigger PollingAutoTriggerConfig`
|
||||
- YAML key: `polling_auto_trigger`
|
||||
- 环境变量前缀:`JUNHONG_POLLING_AUTO_TRIGGER_`
|
||||
|
||||
## 配置验证(已确认)
|
||||
- 不在 Validate() 中添加校验
|
||||
- 零值(false/0)是合法默认值
|
||||
|
||||
## 原子提交策略(已确认)
|
||||
- Commit 1: config 文件
|
||||
- Commit 2: service bug fix + redis 注释
|
||||
- Commit 3: handler 集成(此时全量 build 暂时报错)
|
||||
- Commit 4: DI 接线(修复全量 build)
|
||||
Reference in New Issue
Block a user