mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-18 23:33:51 +01:00
refactor(agent): extract agent pool and HTTP utilities to dedicated package
Moved non-agent-specific logic from agent/pkg/agent/ to internal/agentpool/: - pool.go: Agent pool management (Get, Add, Remove, List, Iter, etc.) - http_requests.go: HTTP utilities (health checks, forwarding, websockets, reverse proxy) - agent.go: Agent struct with HTTP client management This separates general-purpose pool management from agent-specific configuration, improving code organization and making the agent package focused on agent config only.
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"github.com/bytedance/sonic"
|
||||
"github.com/moby/moby/api/types/container"
|
||||
"github.com/yusing/ds/ordered"
|
||||
"github.com/yusing/godoxy/agent/pkg/agent"
|
||||
"github.com/yusing/godoxy/internal/agentpool"
|
||||
gperr "github.com/yusing/goutils/errs"
|
||||
)
|
||||
|
||||
@@ -20,7 +20,7 @@ type (
|
||||
|
||||
State container.ContainerState `json:"state"`
|
||||
|
||||
Agent *agent.AgentConfig `json:"agent"`
|
||||
Agent *agentpool.Agent `json:"agent"`
|
||||
|
||||
Labels map[string]string `json:"-"` // for creating routes
|
||||
ActualLabels map[string]string `json:"labels"` // for displaying in UI
|
||||
|
||||
Reference in New Issue
Block a user