(cfg *agent.AgentConfig)
| 38 | } |
| 39 | |
| 40 | func Add(cfg *agent.AgentConfig) (added bool) { |
| 41 | _, loaded := agentPool.LoadOrCompute(cfg.Addr, func() (*Agent, bool) { |
| 42 | return newAgent(cfg), false |
| 43 | }) |
| 44 | return !loaded |
| 45 | } |
| 46 | |
| 47 | func Has(cfg *agent.AgentConfig) bool { |
| 48 | _, ok := agentPool.Load(cfg.Addr) |
no test coverage detected