mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 09:48:49 +02:00
refactor(agent): move agent pool to agent package, rename route.Agent() to route.GetAgent()
This commit is contained in:
@@ -16,7 +16,6 @@ import (
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/yusing/go-proxy/agent/pkg/agent"
|
||||
"github.com/yusing/go-proxy/internal/common"
|
||||
config "github.com/yusing/go-proxy/internal/config/types"
|
||||
"github.com/yusing/go-proxy/internal/task"
|
||||
)
|
||||
|
||||
@@ -122,7 +121,7 @@ func NewClient(host string) (*SharedClient, error) {
|
||||
var dial func(ctx context.Context) (net.Conn, error)
|
||||
|
||||
if agent.IsDockerHostAgent(host) {
|
||||
cfg, ok := config.GetInstance().GetAgent(host)
|
||||
cfg, ok := agent.GetAgent(host)
|
||||
if !ok {
|
||||
panic(fmt.Errorf("agent %q not found", host))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user