MCPcopy
hub / github.com/bradfitz/gomemcache / withAddrRw

Method withAddrRw

memcache/memcache.go:367–374  ·  view source on GitHub ↗
(addr net.Addr, fn func(*conn) error)

Source from the content-addressed store, hash-verified

365}
366
367func (c *Client) withAddrRw(addr net.Addr, fn func(*conn) error) (err error) {
368 cn, err := c.getConn(addr)
369 if err != nil {
370 return err
371 }
372 defer cn.condRelease(&err)
373 return fn(cn)
374}
375
376func (c *Client) withKeyRw(key string, fn func(*conn) error) error {
377 return c.withKeyAddr(key, func(addr net.Addr) error {

Callers 6

withKeyRwMethod · 0.95
getFromAddrMethod · 0.95
flushAllFromAddrMethod · 0.95
pingMethod · 0.95
touchFromAddrMethod · 0.95
getAndTouchFromAddrMethod · 0.95

Calls 2

getConnMethod · 0.95
condReleaseMethod · 0.80

Tested by

no test coverage detected