MCPcopy
hub / github.com/yusing/godoxy / Get

Function Get

internal/agentpool/pool.go:24–29  ·  view source on GitHub ↗
(agentAddrOrDockerHost string)

Source from the content-addressed store, hash-verified

22}
23
24func Get(agentAddrOrDockerHost string) (*Agent, bool) {
25 if !agent.IsDockerHostAgent(agentAddrOrDockerHost) {
26 return getAgentByAddr(agentAddrOrDockerHost)
27 }
28 return getAgentByAddr(agent.GetAgentAddrFromDockerHost(agentAddrOrDockerHost))
29}
30
31func GetAgent(name string) (*Agent, bool) {
32 for _, agent := range agentPool.Range {

Callers 5

validateMethod · 0.92
SystemInfoFunction · 0.92
CreateFunction · 0.92
FromDockerFunction · 0.92
NewClientFunction · 0.92

Calls 3

IsDockerHostAgentFunction · 0.92
getAgentByAddrFunction · 0.85

Tested by

no test coverage detected