WebhockTransfer/docs/webhook-relay/CONSENSUS_webhook-relay.md
houhuan 2bc7460f1f feat: 初始化Webhook中继系统项目
- 添加FastAPI应用基础结构,包括主入口、路由和模型定义
- 实现Webhook接收端点(/webhook/{namespace})和健康检查(/health)
- 添加管理后台路由和模板,支持端点、目标、渠道和模板管理
- 包含SQLite数据库模型定义和初始化逻辑
- 添加日志记录和统计服务
- 包含Dockerfile和配置示例文件
- 添加项目文档,包括设计、流程图和验收标准
2025-12-21 18:43:12 +08:00

26 lines
853 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.

# 共识与决策
## 技术选型
- 语言与框架Python + FastAPI
- 网络库httpx
- 配置YAMLPyYAML环境变量 `WEBHOOK_CONFIG_PATH`
- 重试:简单指数退避
- 容器python:3.12-slim入口 `uvicorn app.main:app --host 0.0.0.0 --port 8080`
## 接口规范
- `POST /webhook/{namespace}` 接收上游负载;`GET /health` 健康检查
## 配置规范
- `targets`目标Webhook注册表
- `routing.remark_map`remark到target名称列表映射
- `notifications.event_map`:事件模板与渠道列表
- `channels`各渠道机器人Webhook列表
## 路由与通知规则
- 路由按 `remark` 精确匹配,多目标并发转发
- 通知按 `event_define_no` 模板渲染,支持多渠道并发推送
## 验收口径
- 示例JSON生成消息与路由正确返回结构包含每个目标与渠道的状态