MCPcopy
hub / github.com/grafana/dskit / RemoveClientFor

Method RemoveClientFor

ring/client/pool.go:168–176  ·  view source on GitHub ↗

RemoveClientFor removes the client with the specified address

(addr string)

Source from the content-addressed store, hash-verified

166
167// RemoveClientFor removes the client with the specified address
168func (p *Pool) RemoveClientFor(addr string) {
169 p.Lock()
170 defer p.Unlock()
171 member, ok := p.members[addr]
172 if ok {
173 delete(p.members, addr)
174 p.closeClient(addr, member.client)
175 }
176}
177
178func (p *Pool) closeClient(addr string, client PoolClient) {
179 if p.clientsMetric != nil {

Callers 3

removeStaleClientsMethod · 0.95
cleanUnhealthyMethod · 0.95
TestPoolCacheFunction · 0.95

Calls 1

closeClientMethod · 0.95

Tested by 1

TestPoolCacheFunction · 0.76