refactor!: rename the project from Monitor to MoShiro
Namespaces, assemblies, projects and directories, the solution, binaries, images, systemd units, config paths, environment variables, protocol method names, the media type and the raw chunk magic all move to MoShiro/moshiro. Existing data and deployments are not compatible and must be recreated. Also fix the architecture tests after the solution layout change and make the update tests independent of their order.
This commit is contained in:
1 parent
17b35223aa
commit
83e5120377
309 files changed
+1505
-1499
No files matched your search
+12
-12
@@ -1,17 +1,17 @@
|
||||
# Backend
|
||||
|
||||
Backend 是 Monitor 的控制面和数据服务,负责 Agent 注册与连接、任务编排、原始测量数据持久化、指标分析,以及供前端使用的 REST API 和 SSE 实时数据流。
|
||||
Backend 是 MoShiro 的控制面和数据服务,负责 Agent 注册与连接、任务编排、原始测量数据持久化、指标分析,以及供前端使用的 REST API 和 SSE 实时数据流。
|
||||
|
||||
## 组件
|
||||
|
||||
| 路径 | 职责 |
|
||||
| --- | --- |
|
||||
| `src/Monitor.Backend/` | 应用入口与依赖组合 |
|
||||
| `src/Monitor.Backend.Api/` | Public、Admin API 和 OpenAPI |
|
||||
| `src/Monitor.Backend.Gateway/` | Fleet RPC、节点状态与测量数据接收 |
|
||||
| `src/Monitor.Backend.Application/` | 业务用例、查询、任务和后台服务 |
|
||||
| `src/Monitor.Backend.Analysis/` | 指标计算、累加器和服务模型 |
|
||||
| `src/Monitor.Backend.Storage.Sqlite/` | 段文件与 SQLite 存储 |
|
||||
| `src/MoShiro.Backend/` | 应用入口与依赖组合 |
|
||||
| `src/MoShiro.Backend.Api/` | Public、Admin API 和 OpenAPI |
|
||||
| `src/MoShiro.Backend.Gateway/` | Fleet RPC、节点状态与测量数据接收 |
|
||||
| `src/MoShiro.Backend.Application/` | 业务用例、查询、任务和后台服务 |
|
||||
| `src/MoShiro.Backend.Analysis/` | 指标计算、累加器和服务模型 |
|
||||
| `src/MoShiro.Backend.Storage.Sqlite/` | 段文件与 SQLite 存储 |
|
||||
| `fleet/` | 通用节点身份、注册和连接框架 |
|
||||
| `shared/` | 测量引擎、协议和数据格式 |
|
||||
| `tests/` | 集成测试和测试支持代码 |
|
||||
@@ -26,14 +26,14 @@ Backend 是 Monitor 的控制面和数据服务,负责 Agent 注册与连接
|
||||
|
||||
```sh
|
||||
cd backend
|
||||
dotnet build Monitor.slnx -c Release
|
||||
dotnet test --solution Monitor.slnx
|
||||
dotnet build MoShiro.slnx -c Release
|
||||
dotnet test --solution MoShiro.slnx
|
||||
```
|
||||
|
||||
发布当前平台的 NativeAOT Backend:
|
||||
|
||||
```sh
|
||||
dotnet publish src/Monitor.Backend -c Release -r <RID> -p:PublishAot=true
|
||||
dotnet publish src/MoShiro.Backend -c Release -r <RID> -p:PublishAot=true
|
||||
```
|
||||
|
||||
例如 `<RID>` 可为 `win-x64`、`linux-x64` 或 `linux-arm64`。NativeAOT 发布需要对应平台的 C/C++ 工具链。仓库根目录的 `scripts/publish.sh backend <RID>` 可构建单个平台的 Backend 可执行文件;容器发布由 Woodpecker tag 流水线完成,详见 [`../docs/deployment.md`](../docs/deployment.md)。
|
||||
@@ -46,9 +46,9 @@ dotnet publish src/Monitor.Backend -c Release -r <RID> -p:PublishAot=true
|
||||
|
||||
```sh
|
||||
cd backend
|
||||
dotnet run --project src/Monitor.Backend -- --urls http://localhost:5000
|
||||
dotnet run --project src/MoShiro.Backend -- --urls http://localhost:5000
|
||||
```
|
||||
|
||||
首次启动时可用 `Monitor__InitialAdminUser` 和 `Monitor__InitialAdminPassword` 设置初始管理员。数据目录、公开地址、Cookie 和 CORS 等设置通过 `Monitor` 配置节传入;完整配置说明见 [`../docs/deployment.md`](../docs/deployment.md)。站点默认需要登录,可在管理端修改公开设置。
|
||||
首次启动时可用 `MoShiro__InitialAdminUser` 和 `MoShiro__InitialAdminPassword` 设置初始管理员。数据目录、公开地址、Cookie 和 CORS 等设置通过 `MoShiro` 配置节传入;完整配置说明见 [`../docs/deployment.md`](../docs/deployment.md)。站点默认需要登录,可在管理端修改公开设置。
|
||||
|
||||
OpenAPI 文档由构建生成到 `openapi/v1.json`。API 设计和端点说明见 [`../docs/api.md`](../docs/api.md);项目总览见仓库根目录的 [`README.md`](../README.md)。
|
||||
Reference in new issue
Block a user