[ Status ] 完成Agent Metric部分

This commit is contained in:
zeaslity
2023-07-10 16:24:36 +08:00
parent f5a3db2f56
commit 2f477fd1cc
43 changed files with 491 additions and 381 deletions

View File

@@ -23,7 +23,14 @@ const (
BaseFuncOssUrlPrefix = "https://b2.107421.xyz/"
)
var pool, _ = ants.NewPool(100, ants.WithNonblocking(false), ants.WithLogger(logger2.Log), ants.WithMaxBlockingTasks(30), ants.WithDisablePurge(true))
// 创建协程池子
var pool, _ = ants.NewPool(
100,
ants.WithNonblocking(false),
ants.WithLogger(logger2.Log),
ants.WithMaxBlockingTasks(30),
ants.WithDisablePurge(true),
)
var G = NewGlobal(
pool,

View File

@@ -56,7 +56,6 @@ func GetNetworkStatus() (*NetworkStatus, error) {
}
// 休眠3秒
time.Sleep(3 * time.Second)
var sentAfter uint64

View File

@@ -43,6 +43,7 @@ func Ping() string {
return "PONG"
}
// todo change to go model
func ReportAppStatus() *AgentStatus {
cpuStatus, cpuerr := GetCPUStatus()