MCPcopy Index your code
hub / github.com/CodisLabs/codis / handleRequestSlotsInfo

Method handleRequestSlotsInfo

pkg/proxy/session.go:548–565  ·  view source on GitHub ↗
(r *Request, d *Router)

Source from the content-addressed store, hash-verified

546}
547
548func (s *Session) handleRequestSlotsInfo(r *Request, d *Router) error {
549 var addr string
550 var nblks = len(r.Multi) - 1
551 switch {
552 case nblks != 1:
553 r.Resp = redis.NewErrorf("ERR wrong number of arguments for 'SLOTSINFO' command")
554 return nil
555 default:
556 addr = string(r.Multi[1].Value)
557 copy(r.Multi[1:], r.Multi[2:])
558 r.Multi = r.Multi[:nblks]
559 }
560 if !d.dispatchAddr(r, addr) {
561 r.Resp = redis.NewErrorf("ERR backend server '%s' not found", addr)
562 return nil
563 }
564 return nil
565}
566
567func (s *Session) handleRequestSlotsScan(r *Request, d *Router) error {
568 var nblks = len(r.Multi) - 1

Callers 1

handleRequestMethod · 0.95

Calls 1

dispatchAddrMethod · 0.80

Tested by

no test coverage detected