Files
platforms/backend/README.md

13 lines
806 B
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.
# 后端服务仓
本目录采用 BSM-SDK Core 分层:每个 Go 进程均使用 `cmd``internal/config``internal/impl``internal/logic``internal/models``internal/routers``etc``scripts``test``Makefile` 约定。
| 目录 | 进程与职责 |
| --- | --- |
| `api` | Gin HTTP API / BFF、同步事务、JWT 鉴权与统一响应 |
| `worker` | Outbox 投递、超时扫描与可重试异步任务 |
| `iot-gateway` | API/Worker 与 IoT Server 之间的无状态上下行 HTTP 轻网关 |
| `iot-server` | 内嵌 Mochi MQTT Broker、厂商二进制协议、遥测、命令与回执 |
四个进程沿用统一的工程机制API 是命令、Outbox 和上行报文的数据库事实主责Worker 负责投递IoT Client 负责系统接口IoT Server 负责设备协议。