feat(http)!: 补齐核心请求处理与应用生命周期能力
Verify / verify (push) Canceled after 0s

增加安全字段校验提示、请求预算和就绪/存活探针,
让绑定、数据库、Redis 和出站响应解码保留可信诊断上下文。
补充完整应用装配及逆序清理示例,同步接入和迁移文档。

验证:make verify、make race-check 全部通过。

BREAKING CHANGE: 普通 Controller 默认启用 30 秒协作式请求预算,
可用 request_timeout_ms: 0 或 max-exec-time:"0" 关闭;
字段校验失败的 400 响应增加安全字段明细。
This commit is contained in:
zhangdeman committed 2026-11-26 20:41:33 -08:00
1 parent b4c3ac622c
commit 3196e45a01
22 files changed
+1294 -79

No files matched your search

+8
View File
@@ -34,3 +34,11 @@ func Capture(target *error, code int, message string) {
*target = Wrap(code, message, *target)
}
}
// CaptureContext 为命名返回值补充场景并在原调用上下文记录一次。
// 入参:ctx 为可信标准上下文,target 为命名返回值地址,code 为场景码,message 为安全摘要。
func CaptureContext(ctx context.Context, target *error, code int, message string) {
if target != nil {
*target = WrapContext(ctx, code, message, *target)
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.