29 lines
1.2 KiB
Go
29 lines
1.2 KiB
Go
package heartbeat
|
||
|
||
import "time"
|
||
|
||
// 1.返回应用一体机开机后运行时间和开始时间
|
||
// 2.返回CPU、内存、网卡等配置信息、型号信息、操作系统信息,硬盘信息等
|
||
|
||
// HeartBeat 一体机-心跳检测信息
|
||
type HeartBeat struct {
|
||
SerialNo string `json:"serialNo"` // 序列号
|
||
AgentVersion string `json:"agentVersion"` // 小助手版本
|
||
IPAddress string `json:"ipAddress"` // ip地址,多个逗号分割
|
||
MACAddress string `json:"macAddress"` // mac地址
|
||
|
||
Architecture string `json:"archType"` // architecture
|
||
KernelVersion string `json:"kernelVersion"` // kernel_version
|
||
OS string `json:"osInfo"` // os
|
||
OSType string `json:"osType"` // os
|
||
|
||
LastStarttime time.Time `json:"lastStarttime"` // 最近开机时间, 2023-08-16 00:00:00 - 2023-08-16 23:59:59
|
||
COMInfo []COMInfo `json:"comInfo"` // 组件信息
|
||
}
|
||
|
||
type COMInfo struct {
|
||
LastStarttime time.Time `json:"lastStarttime"` // 最近运行时间, 2023-08-16 00:00:00
|
||
Name string `json:"name"` // 组件名称
|
||
Status string `json:"status"` // 组件状态,0:离线,1:在线,2:故障
|
||
}
|