Commit Graph

3 Commits

Author SHA1 Message Date
hhs
ba6d565c0f feat: 实现 Redis 版 SessionManager(Hash + List,TTL 自动刷新) 2026-06-13 15:27:41 +08:00
hhs
da87ec776b feat: main.go 接入配置 + graceful shutdown + logger 迁移
- main.go: 接入 config.Load() 替换硬编码 :8080
- main.go: 添加 signal.NotifyContext + http.Server.Shutdown(10s drain)
- main.go: 初始化 Zap 日志,prod 环境切换 Gin release 模式
- ws/handler.go: 所有 log.Printf 替换为 logger.Log 结构化日志
- 修复 .gitignore 排除规则(/server 仅匹配根目录二进制)
- 新增 zap、viper 依赖
2026-06-13 15:18:03 +08:00
hhs
9f876df816 feat: 初始化 Go 后端项目骨架
- 使用 Gin 框架替代原始 net/http,方便调试
- 实现 WebSocket 端点 (/ws),支持 ping/query/config/interrupt 消息
- 实现健康检查 REST 接口 (/api/health)
- 定义协议数据结构 (models)
- 心跳检测(60 秒超时断开)
2026-06-12 17:34:43 +08:00