增加获取各项监控的单独api
This commit is contained in:
@@ -35,6 +35,6 @@ var (
|
||||
Db *gorm.DB
|
||||
RedisDb *redis.Client
|
||||
SystemSetting *systemSetting.SystemSettingCache
|
||||
SystemMonitor cache.Cacher[ModelSystemMonitor]
|
||||
SystemMonitor cache.Cacher[interface{}]
|
||||
RateLimit *RateLimiter
|
||||
)
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
package global
|
||||
|
||||
import "sun-panel/lib/monitor"
|
||||
import (
|
||||
"sun-panel/lib/monitor"
|
||||
)
|
||||
|
||||
const (
|
||||
SystemMonitor_CPU_INFO = "CPU_INFO"
|
||||
SystemMonitor_MEMORY_INFO = "MEMORY_INFO"
|
||||
SystemMonitor_DISK_INFO = "DISK_INFO"
|
||||
)
|
||||
|
||||
type ModelSystemMonitor struct {
|
||||
CPUInfo monitor.CPUInfo `json:"cpuInfo"`
|
||||
|
||||
Reference in New Issue
Block a user