MCPcopy
hub / github.com/CodisLabs/codis / GetClient

Method GetClient

pkg/utils/redis/client.go:379–385  ·  view source on GitHub ↗
(addr string)

Source from the content-addressed store, hash-verified

377}
378
379func (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
387func (p *Pool) getClientFromCache(addr string) (*Client, error) {
388 p.mu.Lock()

Callers 4

InfoMethod · 0.95
InfoFullMethod · 0.95
RefreshRedisStatsMethod · 0.80
newSlotActionExecutorMethod · 0.80

Calls 2

getClientFromCacheMethod · 0.95
NewClientFunction · 0.70

Tested by

no test coverage detected