5 Commits

Author SHA1 Message Date
xfy
2734b04d8f refactor: remove 16.8k lines of dead code across all internal packages
- Delete unused files: tempfile subsystem, matcher variants, server/internal
- Remove 200+ unused functions across proxy, ssl, lua, http2/3, stream, variable
- Fix proxy test type errors (backgroundRefresh ctx→Request)
- Move bench/tools mock backend into internal/testutil
- Remove corresponding test functions for all deleted code
2026-06-03 16:15:43 +08:00
xfy
dc7358bf4e feat(variable): 添加 EphemeralGet 和 PersistentGet 零拷贝变量访问 API
- 新增 EphemeralGet() 方法返回 []byte,用于请求范围内的零拷贝访问
- 新增 PersistentGet() 方法返回 string,用于跨请求持久存储
- BuiltinVariable 结构体添加 GetterBytes 字段支持字节获取器
- Context 结构体添加 bytesCache map 缓存字节值
- 为 $host、$request_uri、$uri、$args、$request_method 添加字节获取器
- 添加完整的单元测试和性能基准测试

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 13:50:15 +08:00
xfy
0731dc46e4 refactor(variable): 重命名核心类型移除冗余前缀
VariableContext → Context
VariableStore → Store
ReleaseVariableContext → ReleaseContext (别名保留向后兼容)
提取硬编码字符串为命名常量 sslProtocolNone

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 09:40:17 +08:00
xfy
4d5dda5b69 style(variable): 添加文件末尾换行符 2026-04-09 12:19:22 +08:00
xfy
25bdba4e01 test(benchmark): 新增组件级基准测试套件
- 新增 benchmark_context.go 标准化测试上下文构造器
- 新增静态文件处理器基准测试(缓存命中/未命中、try_files)
- 新增访问日志中间件基准测试
- 新增压缩中间件基准测试(gzip/brotli、Pool 复用)
- 新增限流器基准测试(令牌桶、滑动窗口、多客户端并发)
- 新增变量展开基准测试(模板展开、Pool 操作)
2026-04-08 18:25:38 +08:00