feat: balancer dashboard metrics + fix WebSocket Hijacker
This commit is contained in:
@@ -209,10 +209,29 @@ type ZabbixResponse struct {
|
||||
Data []ZabbixNode `json:"data"`
|
||||
}
|
||||
|
||||
// --- Balancer ---
|
||||
|
||||
// BalancerInfo — состояние балансировщика для дашборда.
|
||||
type BalancerInfo struct {
|
||||
EslConnected bool `json:"esl_connected"`
|
||||
EslUptimeSec int64 `json:"esl_uptime_sec,omitempty"`
|
||||
EslReconnects int64 `json:"esl_reconnects,omitempty"`
|
||||
NatsConnected bool `json:"nats_connected"`
|
||||
GatewaysTotal int `json:"gateways_total"`
|
||||
GatewaysUp int `json:"gateways_up"`
|
||||
GatewaysDown int `json:"gateways_down"`
|
||||
FsActiveCalls int `json:"fs_active_calls"`
|
||||
FsMaxSessions int `json:"fs_max_sessions"`
|
||||
FsUptime string `json:"fs_uptime"`
|
||||
RouteTotal int64 `json:"route_total"`
|
||||
RouteFallbacks int64 `json:"route_fallbacks"`
|
||||
UptimeSec int64 `json:"uptime_sec"`
|
||||
}
|
||||
|
||||
// --- WebSocket ---
|
||||
|
||||
// WsMetricsMessage — сообщение, отправляемое по WebSocket.
|
||||
type WsMetricsMessage struct {
|
||||
Type string `json:"type"` // "nodes_update", "node_toggle", etc
|
||||
Type string `json:"type"` // "nodes_update", "balancer_update", "gateway_update", etc
|
||||
Payload interface{} `json:"payload"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user