66 lines
2.3 KiB
Go
66 lines
2.3 KiB
Go
package edge_node
|
|
|
|
import (
|
|
"time"
|
|
|
|
commonDto "git.ilapage.cn/ila/yovision/Sense/server/common/dto"
|
|
)
|
|
|
|
const HeartbeatTimeout = 90 * time.Second
|
|
|
|
type PageRequest struct {
|
|
commonDto.Pagination `search:"-"`
|
|
}
|
|
|
|
type Summary struct {
|
|
Total int `json:"total"`
|
|
Online int `json:"online"`
|
|
Offline int `json:"offline"`
|
|
Recovering int `json:"recovering"`
|
|
LoadUsed int `json:"loadUsed"`
|
|
LoadCapacity int `json:"loadCapacity"`
|
|
BackfillQueueDepth int `json:"backfillQueueDepth"`
|
|
HeartbeatTimeout int64 `json:"heartbeatTimeoutSeconds"`
|
|
}
|
|
|
|
type Response struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Location string `json:"location"`
|
|
Status string `json:"status"`
|
|
RuntimeVersion string `json:"runtimeVersion"`
|
|
ModelVersion string `json:"modelVersion"`
|
|
StartedAt time.Time `json:"startedAt"`
|
|
UptimeSeconds int64 `json:"uptimeSeconds"`
|
|
LastHeartbeatAt time.Time `json:"lastHeartbeatAt"`
|
|
LastCollectedAt time.Time `json:"lastCollectedAt"`
|
|
FreshnessSeconds int64 `json:"freshnessSeconds"`
|
|
Stale bool `json:"stale"`
|
|
LoadUsed int `json:"loadUsed"`
|
|
LoadCapacity int `json:"loadCapacity"`
|
|
ControlTunnelStatus string `json:"controlTunnelStatus"`
|
|
ControlTunnelDetail string `json:"controlTunnelDetail"`
|
|
ControlLatencyMs int `json:"controlLatencyMs"`
|
|
VideoPlaneStatus string `json:"videoPlaneStatus"`
|
|
VideoPlaneDetail string `json:"videoPlaneDetail"`
|
|
ActiveStreamCount int `json:"activeStreamCount"`
|
|
BackfillStatus string `json:"backfillStatus"`
|
|
BackfillQueueDepth int `json:"backfillQueueDepth"`
|
|
RecoveryPhase string `json:"recoveryPhase"`
|
|
ProjectionVersion int64 `json:"projectionVersion"`
|
|
Events []Event `json:"events,omitempty"`
|
|
}
|
|
|
|
type PageResponse struct {
|
|
Summary Summary `json:"summary"`
|
|
List []Response `json:"list"`
|
|
Count int64 `json:"count"`
|
|
}
|
|
|
|
// HeartbeatSample is an internal Sense adapter input. It is intentionally not
|
|
// exposed as an HTTP contract by this task.
|
|
type HeartbeatSample struct {
|
|
Node
|
|
CollectedAt time.Time
|
|
}
|