Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
38 lines
1.2 KiB
Go
38 lines
1.2 KiB
Go
package proto
|
|
|
|
type HealthCheckRequest struct {
|
|
GroupID string `json:"groupId" binding:"required"`
|
|
Timestamp int64 `json:"timestamp" binding:"required"`
|
|
Sign string `json:"sign" binding:"required"`
|
|
}
|
|
|
|
type ComponentStatus struct {
|
|
Status string `json:"status"`
|
|
Msg string `json:"msg,omitempty"`
|
|
Master string `json:"master,omitempty"`
|
|
}
|
|
|
|
type HealthCPUMetrics struct {
|
|
Cores int `json:"cores"`
|
|
Used float64 `json:"used"`
|
|
}
|
|
|
|
type HealthMemoryMetrics struct {
|
|
Total int64 `json:"total"`
|
|
Used int64 `json:"used"`
|
|
}
|
|
|
|
type HealthCheckData struct {
|
|
ServerName string `json:"serverName,omitempty"`
|
|
ServerIP string `json:"serverIp,omitempty"`
|
|
CPU HealthCPUMetrics `json:"cpu"`
|
|
Memory HealthMemoryMetrics `json:"memory"`
|
|
Disk HealthMemoryMetrics `json:"disk"`
|
|
Mysql *ComponentStatus `json:"mysql,omitempty"`
|
|
Mongodb *ComponentStatus `json:"mongodb,omitempty"`
|
|
Redis *ComponentStatus `json:"redis,omitempty"`
|
|
Elasticsearch *ComponentStatus `json:"elasticsearch,omitempty"`
|
|
Kafka *ComponentStatus `json:"kafka,omitempty"`
|
|
Timestamp int64 `json:"timestamp"`
|
|
}
|