mirror of
https://github.com/woodchen-ink/proxy-go.git
synced 2025-07-18 00:21:56 +08:00
- Remove legacy static files, templates, and JavaScript - Update main.go to serve SPA-style web application - Modify admin route handling to support client-side routing - Simplify configuration and metrics API endpoints - Remove server-side template rendering in favor of static file serving - Update Dockerfile and GitHub Actions to build web frontend
27 lines
598 B
Go
27 lines
598 B
Go
package constants
|
|
|
|
import (
|
|
"proxy-go/internal/config"
|
|
"time"
|
|
)
|
|
|
|
var (
|
|
// 缓存相关
|
|
CacheTTL = 5 * time.Minute // 缓存过期时间
|
|
MaxCacheSize = 10000 // 最大缓存大小
|
|
|
|
// 指标相关
|
|
MetricsInterval = 5 * time.Minute // 指标收集间隔
|
|
MaxPathsStored = 1000 // 最大存储路径数
|
|
MaxRecentLogs = 1000 // 最大最近日志数
|
|
|
|
// 单位常量
|
|
KB int64 = 1024
|
|
MB int64 = 1024 * KB
|
|
)
|
|
|
|
// UpdateFromConfig 从配置文件更新常量
|
|
func UpdateFromConfig(cfg *config.Config) {
|
|
// 空实现,不再需要更新监控相关配置
|
|
}
|