完成基本的系统监控类库

This commit is contained in:
Sun
2024-01-02 22:11:34 +08:00
parent 2e0af5f147
commit c447884d77
6 changed files with 198 additions and 0 deletions
+4
View File
@@ -12,11 +12,13 @@ import (
"sun-panel/initialize/other"
"sun-panel/initialize/redis"
"sun-panel/initialize/runlog"
"sun-panel/initialize/systemMonitor"
"sun-panel/initialize/systemSettingCache"
"sun-panel/initialize/userToken"
"sun-panel/lib/cmn"
"sun-panel/models"
"sun-panel/structs"
"time"
"log"
@@ -88,6 +90,8 @@ func InitApp() error {
// 其他的初始化
global.VerifyCodeCachePool = other.InitVerifyCodeCachePool()
global.SystemSetting = systemSettingCache.InItSystemSettingCache()
global.SystemMonitor = global.NewCache[global.ModelSystemMonitor](5*time.Hour, -1, "systemMonitorCache")
systemMonitor.Start(global.SystemMonitor, 3*time.Second)
return nil
}