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

Method HashKey

extern/deprecated/redis-test/utils.go:211–223  ·  view source on GitHub ↗
(c *Conn)

Source from the content-addressed store, hash-verified

209}
210
211func (u *Unit) HashKey(c *Conn) int {
212 var rsp interface{}
213 defer func() {
214 if x := recover(); x != nil {
215 Panic("slotshashkey: c = %s, key = '%s', error = '%s', rsp = %v", c.Addr(), u.key, x, rsp)
216 }
217 }()
218 var err error
219 if rsp, err = c.Do("slotshashkey", u.key); err != nil {
220 panic(err)
221 }
222 return c.Int(c.Values(rsp, 1)[0])
223}
224
225func (u *Unit) Set(c *Conn, val interface{}) {
226 var rsp interface{}

Callers 1

mainMethod · 0.95

Calls 5

ValuesMethod · 0.80
PanicFunction · 0.70
AddrMethod · 0.45
DoMethod · 0.45
IntMethod · 0.45

Tested by

no test coverage detected