refactor, fix metrics and upgrade go to 1.24.0

This commit is contained in:
yusing
2025-02-12 11:15:45 +08:00
parent c807b30c8f
commit 82042e0b99
19 changed files with 157 additions and 104 deletions

View File

@@ -16,7 +16,7 @@ func Stats(cfg config.ConfigInstance, w http.ResponseWriter, r *http.Request) {
}
func StatsWS(cfg config.ConfigInstance, w http.ResponseWriter, r *http.Request) {
U.PeriodicWS(cfg, w, r, 1*time.Second, func(conn *websocket.Conn) error {
U.PeriodicWS(cfg.Value().MatchDomains, w, r, 1*time.Second, func(conn *websocket.Conn) error {
return wsjson.Write(r.Context(), conn, getStats(cfg))
})
}