goProject/.svn/pristine/13/13a7a5172d7c0e0fdc2fe718e7d1e71f371e8ac6.svn-base
2025-01-06 16:21:36 +08:00

77 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package monitorNewMgr
import (
"time"
)
//服务器节点信息
type ServerNodeMessage struct {
//通用信息
CommInfo CommInfoModel
// indexMap 指标对象
IndexSlice []Index
}
type Index struct {
// IndexName 指标名字eg:可以为cpu,mem,numGoroutine,proxy
IndexName string
// moduleName 模块名字
ModuleName string
// methodName 方法名字
MethodName string
// value 指标值eg:indexName为cpu时value 为cpu使用率indexName为内存时value为内存使用率
Value float64
}
//服务监控中心信息
type MonitorCenterMessage struct {
//通用信息
CommInfo CommInfoModel
// Cpu 核数
Cpu int32
// Mem 内存大小
Mem int32
// Status
Status int32
}
// 通用信息
type CommInfoModel struct {
// 项目组ID
GroupId string
// projectId 项目Id (eg迪士尼)
ProjectId string
// clusterId 集群Id(一个集群相当于一个大区)
ClusterId string
// 组密钥
ProjectSecret string
// 服务器IP
IP string
// Port 服务端口
Port int32
// 服务名eg:玩家服务player,城市服务:city,代理服务proxy
ServiceName string
// instanceId 服务实例Id
InstanceId string
// tll 时间戳
Tll time.Duration
// 签名
Sign string
}