feat: 服务器资源监控信息

This commit is contained in:
TsMask
2023-10-28 17:00:03 +08:00
parent 4a577c89e7
commit ff1c760452
9 changed files with 582 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
package service
// IMonitor 服务器系统相关信息 服务层接口
type IMonitor interface {
// RunMonitor 执行资源监控
RunMonitor()
// RunMonitorDataCancel 启动资源监控数据存储io/network通道 移除之前的chan上下文后在设置新的均值
// interval 采集的平均值(分钟)
RunMonitorDataCancel(removeBefore bool, interval float64)
// SelectMonitorInfo 查询监控资源信息
SelectMonitorInfo(query map[string]any) map[string]MonitorData
}