|
|
f2352ab9cc
|
docs(config,stream,logging,handler,proxy,cache,server,ssl,middleware): 为核心模块添加详细 GoDoc 文档注释
- config: 为 Config 和所有子配置结构添加完整文档,包含使用示例和注意事项
- stream: 为负载均衡器和服务器添加详细的参数、返回值和功能说明
- logging: 为日志格式化和输出函数添加文档,说明支持的变量替换
- handler: 为路由器、静态文件和 sendfile 处理器添加文档
- proxy: 为健康检查器和代理功能添加完整文档
- cache/server/ssl/middleware: 补充相关模块的文档注释
- config.example.yaml: 添加可信代理配置、加密套件示例,更新压缩级别说明
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-04-07 15:36:09 +08:00 |
|
|
|
0a50678b55
|
test(handler): 完善 handler 模块测试覆盖率
覆盖率从 45.3% 提升至 58.5%,新增测试:
- TestStaticHandler_SetFileCache: 文件缓存设置测试
- TestStaticHandler_SetGzipStatic: Gzip 静态文件设置测试
- TestStaticHandler_Handle_HeadRequest: HEAD 请求测试
- TestStaticHandler_Handle_WithCache: 带缓存处理测试
- TestStaticHandler_Handle_Precompressed: 预压缩文件测试
- TestStaticHandler_Handle_LargeFile: 大文件处理测试
- TestStaticHandler_Handle_Symlink: 符号链接测试
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-03 18:35:39 +08:00 |
|
|
|
aa64329ba2
|
feat(server,handler,proxy,app): 集成未使用的中间件和模块
- 集成 6 个安全/功能中间件到 server.go
- 集成 GoroutinePool 和 SendFile 零拷贝
- 集成 FileCache 和 ProxyCache 缓存模块
- 集成 Stream TCP/UDP 代理模块
- 添加 Stream 配置结构到 config.go
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-03 11:27:53 +08:00 |
|
|
|
9d24263918
|
feat(stream,server,handler): 实现 Phase 6 性能优化和热升级
新增功能:
- stream 模块: 流式传输支持,优化大文件和实时数据传输
- Goroutine 池: 限制并发数量,减少调度开销
- 优雅升级: 零停机热升级,继承父进程监听器
- sendfile: 零拷贝文件传输,大文件直接从内核传输
重构改进:
- App 结构体封装,支持热升级和信号处理
- 配置结构字段对齐和代码清理
- 完善错误处理和日志记录
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-04-03 10:39:22 +08:00 |
|
|
|
413e418b37
|
test: 添加 handler/logging/middleware/server 模块单元测试
- internal/handler/static_test.go: 21 个测试用例覆盖静态文件服务和路径遍历安全
- internal/handler/router_test.go: 9 个测试用例覆盖路由注册和方法区分
- internal/logging/logging_test.go: 7 个测试用例覆盖日志级别解析
- internal/middleware/middleware_test.go: 4 个测试用例覆盖中间件链逆序包装
- internal/server/server_test.go: 5 个测试用例覆盖服务器创建和停止
- internal/server/vhost_test.go: 18 个测试用例覆盖虚拟主机路由
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-02 16:21:49 +08:00 |
|