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

Method Set

extern/deprecated/redis-test/utils.go:225–244  ·  view source on GitHub ↗
(c *Conn, val interface{})

Source from the content-addressed store, hash-verified

223}
224
225func (u *Unit) Set(c *Conn, val interface{}) {
226 var rsp interface{}
227 defer func() {
228 if x := recover(); x != nil {
229 Panic("set: c = %s, key = '%s', v = '%s', error = '%s', rsp = %v", c.Addr(), u.key, val, x, rsp)
230 }
231 }()
232 switch val.(type) {
233 default:
234 panic("invalid type")
235 case int:
236 case string:
237 }
238 var err error
239 if rsp, err = c.Do("set", u.key, val); err != nil {
240 panic(err)
241 }
242 c.String(rsp)
243 u.val = val
244}
245
246func (u *Unit) Del(c *Conn, exists bool) {
247 var rsp interface{}

Callers 3

mainMethod · 0.45
playerMethod · 0.45
mainMethod · 0.45

Calls 4

PanicFunction · 0.70
AddrMethod · 0.45
DoMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected