完成系统监控的基础api接口
This commit is contained in:
1 parent
c447884d77
commit
11ea134be3
7 files changed
+60
-20
No files matched your search
@@ -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)
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user