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

Method GetClientFor

ring/client/pool.go:134–136  ·  view source on GitHub ↗

GetClientFor gets the client for the specified address. If it does not exist it will make a new client for that address.

(addr string)

Source from the content-addressed store, hash-verified

132// GetClientFor gets the client for the specified address. If it does not exist
133// it will make a new client for that address.
134func (p *Pool) GetClientFor(addr string) (PoolClient, error) {
135 return p.GetClientForInstance(ring.InstanceDesc{Addr: addr})
136}
137
138// GetClientForInstance gets the client for the specified ring member. If it does not exist
139// it will make a new client for that instance.

Callers 2

TestPoolCacheFunction · 0.95
TestRemoveClientFunction · 0.95

Calls 1

GetClientForInstanceMethod · 0.95

Tested by 2

TestPoolCacheFunction · 0.76
TestRemoveClientFunction · 0.76