refactor: sync

This commit is contained in:
2026-06-17 16:52:30 +03:00
parent 8d3509b2d8
commit 5f72d2dcb4
17 changed files with 105 additions and 44 deletions
@@ -9,19 +9,6 @@ import (
"github.com/rs/zerolog"
)
type Collector interface {
GatherInfoSystem() (domain.HostInfo, []domain.Capability)
}
type Settings interface {
InsertAgentID(agentID string) error
GetAgentID() string
}
type HubConnection interface {
RegisterAgent(ctx context.Context, RegisterData domain.RegisterAgentRequest) (domain.RegisterAgentResponse, error)
}
type AgentService struct {
collect Collector
conn HubConnection
@@ -38,8 +25,6 @@ func NewAgentService(
cfg *config_yaml.AgentConfig,
logger zerolog.Logger,
) *AgentService {
logger = logger.With().Str("component", "internal.service.agent_serivce").Logger()
return &AgentService{collect: collector, conn: conn, cfg: cfg, log: logger, settings: settings}
}
@@ -0,0 +1,20 @@
package agent_service
import (
"context"
"github.com/lorsanstand/HomeOps-Hub/shared/domain"
)
type Collector interface {
GatherInfoSystem() (domain.HostInfo, []domain.Capability)
}
type Settings interface {
InsertAgentID(agentID string) error
GetAgentID() string
}
type HubConnection interface {
RegisterAgent(ctx context.Context, RegisterData domain.RegisterAgentRequest) (domain.RegisterAgentResponse, error)
}