From c116a7089a84a6d9518219088b869ad2230168b5 Mon Sep 17 00:00:00 2001 From: lorsan Date: Tue, 5 May 2026 18:26:18 +0300 Subject: [PATCH] feat: new type structure for stream --- .../domain/{structure.go => agent.go} | 0 hub/internal/domain/stream.go | 34 +++++++++++++++++++ 2 files changed, 34 insertions(+) rename hub/internal/domain/{structure.go => agent.go} (100%) create mode 100644 hub/internal/domain/stream.go diff --git a/hub/internal/domain/structure.go b/hub/internal/domain/agent.go similarity index 100% rename from hub/internal/domain/structure.go rename to hub/internal/domain/agent.go diff --git a/hub/internal/domain/stream.go b/hub/internal/domain/stream.go new file mode 100644 index 0000000..a0d4499 --- /dev/null +++ b/hub/internal/domain/stream.go @@ -0,0 +1,34 @@ +package domain + +type AgentRequest struct { + RequestID string + Name string + Args map[string]string + TimeOut int +} + +type AgentResponse struct { + RequestID string + Success bool + Output string + Error string + ExecTimeMS int +} + +type AgentAlert struct { + Timestamp int + Level string + Title string + Description string +} + +type SystemMetrics struct { + CpuUsage float64 + MemoryUsage float64 + DiskUsage float64 +} + +type Heartbeat struct { + Timestamp string + Metrics SystemMetrics +}