goProject/trunk/framework/monitorNewMgr/serviceMonitorModel.go

77 lines
1.2 KiB
Go
Raw Normal View History

2025-01-06 16:01:02 +08:00
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
}