完成系统监控的基础api接口

This commit is contained in:
Sun
2024-01-02 23:14:04 +08:00
parent c447884d77
commit 11ea134be3
7 changed files with 60 additions and 20 deletions
@@ -17,7 +17,10 @@ func Start(cacher cache.Cacher[global.ModelSystemMonitor], interval time.Duratio
select {
case <-ticker.C:
go func() {
GetInfo()
monitorInfo := GetInfo()
// jsonByte, _ := json.Marshal(monitorInfo)
// fmt.Println("系统监控:", string(jsonByte))
cacher.SetDefault("value", monitorInfo)
}()
}
}