mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(api): add feature flag management endpoints
Add FeatureHandler to manage lightweight runtime configuration toggles stored in the Redis `meta:features` hash. This enables dynamic control over system behavior (e.g., storage backends) via the admin API. - Add `GET /admin/features` to list flags - Add `PUT /admin/features` to update flags - Update README with feature flag documentation
This commit is contained in:
12
README.md
12
README.md
@@ -26,6 +26,18 @@ EZ-API 是"大脑"。它管理着事实的来源 (Source of Truth)。
|
||||
- `POST /models`: 注册支持的模型。
|
||||
- `GET /models`: 列出所有模型。
|
||||
|
||||
### Feature Flags(给未来前端用)
|
||||
|
||||
控制平面会把轻量“开关配置”存到 Redis 的 hash:`meta:features`,并提供管理接口:
|
||||
|
||||
- `GET /admin/features`
|
||||
- `PUT /admin/features`(body 为 JSON map)
|
||||
|
||||
常用 flags:
|
||||
|
||||
- `dp_state_store_backend`: `memory`(默认)/ `redis`
|
||||
- `dp_claude_cross_upstream`: `true` / `false`
|
||||
|
||||
### 系统接口
|
||||
- `POST /sync/snapshot`: 强制将 DB 状态全量重新同步到 Redis。
|
||||
- `POST /logs`: 供 Balancer 推送日志的内部端点 (异步)。
|
||||
|
||||
Reference in New Issue
Block a user