42 lines
893 B
Plaintext
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,
|
|
}
|
|
}
|