refactor: create heartbeats func in HubStore

This commit is contained in:
2026-05-09 22:31:42 +03:00
parent f2d0924bca
commit 6277523b23
9 changed files with 158 additions and 11 deletions
+12 -2
View File
@@ -1,5 +1,7 @@
package domain
import "time"
type AgentRequest struct {
RequestID string
Name string
@@ -28,7 +30,15 @@ type SystemMetrics struct {
DiskUsage float64
}
type Heartbeat struct {
Timestamp string
type HeartbeatModel struct {
ID int
AgentID string
Timestamp time.Time
Metrics SystemMetrics
}
type CreateHeartbeatModel struct {
AgentID string
Timestamp time.Time
Metrics SystemMetrics
}