|
|
1b73df77b6
|
refactor(variable): 将 PoolStats 的 Mutex 改为 atomic.Int64 计数器
使用 sync/atomic 替代 sync.RWMutex,消除统计操作中的锁开销,
提升并发性能。保持 PoolStats 公开 API 不变(返回 plain int64)。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-14 14:24:52 +08:00 |
|
|
|
edf192ff85
|
docs(proxy,resolver,variable): 增强公开 API 文档注释
- proxy: 添加 upstreamCache/protoHTTPS 常量说明
- proxy_dns: 添加文件级文档和所有公开方法的详细注释
- stats: 增强 StatsCollector 接口文档和方法注释
- pool: 增强 PoolStats 字段注释和公开函数文档
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-10 15:29:21 +08:00 |
|
|
|
4a93cf2b5c
|
refactor(variable): 简化变量池函数
- PoolGet() 改为调用 NewContext()
- PoolPut() 改为调用 ReleaseContext()
- 添加 Deprecated 文档注释
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-10 11:20:50 +08:00 |
|
|
|
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 |
|
|
|
c95f474539
|
feat(variable): 新增变量系统支持
新增 internal/variable 包,提供 Nginx 风格的变量展开功能:
- 支持 $remote_addr、$host、$uri、$args 等 30+ 内置变量
- 使用 sync.Pool 优化 VariableContext 分配
- 支持 set_response_info 存储响应状态信息
添加 github.com/google/uuid 依赖用于请求 ID 生成。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-08 11:36:49 +08:00 |
|