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

Method getAndTouchFromAddr

memcache/memcache.go:765–779  ·  view source on GitHub ↗
(addr net.Addr, key string, expiration int32, cb func(*Item))

Source from the content-addressed store, hash-verified

763}
764
765func (c *Client) getAndTouchFromAddr(addr net.Addr, key string, expiration int32, cb func(*Item)) error {
766 return c.withAddrRw(addr, func(conn *conn) error {
767 rw := conn.rw
768 if _, err := fmt.Fprintf(rw, "gat %d %s\r\n", expiration, key); err != nil {
769 return err
770 }
771 if err := rw.Flush(); err != nil {
772 return err
773 }
774 if err := parseGetResponse(rw.Reader, conn, cb); err != nil {
775 return err
776 }
777 return nil
778 })
779}
780
781// Ping checks all instances if they are alive. Returns error if any
782// of them is down.

Callers 1

GetAndTouchMethod · 0.95

Calls 2

withAddrRwMethod · 0.95
parseGetResponseFunction · 0.85

Tested by

no test coverage detected