feat: 换到 Gin 主流栈并补齐运维能力

HTTP 用 Gin,配置用 Viper,日志用 zap,数据用 sqlx;保留原有接口与会商行为。
顺带补上就绪探活、请求号、滚动日志、systemd 与 Dockerfile。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
gozerosandCursor committed 2026-11-04 09:51:41 +08:00
1 parent 0c45b86d67
commit bd427b57a1
26 files changed
+1213 -302

No files matched your search

+10 -2
View File
@@ -1,8 +1,9 @@
package repo
import (
"log"
"strings"
"git.gozeros.com/wsk/eightbf-analysis-go/internal/logging"
)
// ApplySchema 按语句拆开执行;重复索引等可忽略错误不阻断启动。
@@ -15,11 +16,18 @@ func (r *JobRepo) ApplySchema(schemaSQL string) {
strings.Contains(msg, "already exists") {
continue
}
log.Printf("schema 语句失败(已跳过): %v | sql=%.80s…", err, stmt)
logging.L.Warnw("schema 语句失败(已跳过)", "err", err, "sql", trunc(stmt, 80))
}
}
}
func trunc(s string, n int) string {
if len(s) <= n {
return s
}
return s[:n] + "…"
}
func splitSQL(s string) []string {
var out []string
var b strings.Builder