goProject/.svn/pristine/0c/0ce1ecad1add98c087081650bab4b1dc4ba8424b.svn-base
2025-01-06 16:21:36 +08:00

42 lines
893 B
Plaintext

package monitorNewMgr
// 监控信息传输对象
type MonitorModel struct {
//状态码 0 是心跳,非零为错误信息
Code int `json:"Code"`
//组Id
GroupId string `json:"GroupId"`
//组密钥
ProjectId string `json:"ProjectId"`
//项目Id
ServerIp string `json:"ServerIp"`
// 监控使用的服务器IP
ServerName string `json:"ServerName"`
// 监控使用的服务器名称
Content string `json:"Content"`
// 消息产生时的时间戳
Timestamp int64 `json:"Timestamp"`
// 签名
Sign string `json:"Sign"`
}
func newMonitorModel(code int, groupId, projectId, serverIp, serverName, content string, timestamp int64, sign string) *MonitorModel {
return &MonitorModel{
Code: code,
GroupId: groupId,
ProjectId: projectId,
ServerIp: serverIp,
ServerName: serverName,
Content: content,
Timestamp: timestamp,
Sign: sign,
}
}