(addr string)
| 377 | } |
| 378 | |
| 379 | func (p *Pool) GetClient(addr string) (*Client, error) { |
| 380 | c, err := p.getClientFromCache(addr) |
| 381 | if err != nil || c != nil { |
| 382 | return c, err |
| 383 | } |
| 384 | return NewClient(addr, p.auth, p.timeout) |
| 385 | } |
| 386 | |
| 387 | func (p *Pool) getClientFromCache(addr string) (*Client, error) { |
| 388 | p.mu.Lock() |
no test coverage detected