6a08a6ab4a
fix(lint): 修复结构体字段对齐问题
...
调整 Config、Server、APIMethod 结构体字段顺序以优化内存布局,
解决 govet fieldalignment 检查警告。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 11:43:57 +08:00
50a960c539
feat(http2): 实现服务器优雅关闭功能
...
添加 GracefulShutdownTimeout 配置项,实现连接池管理和优雅关闭逻辑:
- HTTP2Config 新增 graceful_shutdown_timeout 字段(默认30秒)
- Server 添加连接池和等待组跟踪活跃连接
- Stop() 方法等待所有连接完成或超时后再退出
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 11:38:01 +08:00
bb77fa6a98
fix(lint): 修复 handler 和 http2 模块 lint 错误
...
- 添加 nolint:errcheck 注释到 defer Close 调用
- 修复 websocket.go 中重复的 nolint 注释格式
- 添加 staticcheck SA1019 nolint 注释到 deprecated WriteScheduler
- 移除 sendfile_linux.go 中未使用的 platformLinux 常量
- 添加文件末尾换行符
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 09:51:30 +08:00
8b382606df
Merge branch 'lint-fix' - resolve sendfile.go conflict
...
Conflict: sendfile.go (!linux build tag) was incorrectly modified to
include linuxSendfile and getSocketFd functions which already exist
in sendfile_linux.go.
Resolution: Keep HEAD version (simple fallback returning ENOTSUP) as
Linux implementation is properly separated in sendfile_linux.go.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 09:26:48 +08:00
239635301c
refactor(http2): 适配变量系统和 resolver 重命名
...
适配 variable.NewContext/ReleaseContext
适配 resolver.DNSCacheEntry
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 09:40:57 +08:00
909bccc1eb
refactor(http2): 使用 textproto.CanonicalMIMEHeaderKey 替代手动实现
...
使用标准库 net/textproto 提供的规范化函数,确保 HTTP 头键
按照 RFC 7230 规范正确处理,包括 MIME 头的特殊大小写规则。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 13:35:29 +08:00
392d0b3449
docs: 新增模块 AGENTS.md 文档,更新目录索引
...
- 新增 http2、integration、resolver、variable 模块 AGENTS.md
- 更新 internal/AGENTS.md 目录表,补充新模块条目
- 更新 docs/prompts.md 添加 generate-config 缺失项分析提示
- 同步更新日期戳至 2026-04-09
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 13:35:29 +08:00
412bfebdd8
feat(http2): 新增 HTTP/2 支持,集成到服务器和应用
2026-04-09 12:18:52 +08:00