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

Method dispatch

pkg/proxy/router.go:139–144  ·  view source on GitHub ↗
(r *Request)

Source from the content-addressed store, hash-verified

137}
138
139func (s *Router) dispatch(r *Request) error {
140 hkey := getHashKey(r.Multi, r.OpStr)
141 var id = Hash(hkey) % MaxSlotNum
142 slot := &s.slots[id]
143 return slot.forward(r, hkey)
144}
145
146func (s *Router) dispatchSlot(r *Request, id int) error {
147 if id < 0 || id >= MaxSlotNum {

Callers 5

handleRequestMethod · 0.45
handleRequestMGetMethod · 0.45
handleRequestMSetMethod · 0.45
handleRequestDelMethod · 0.45
handleRequestExistsMethod · 0.45

Calls 3

getHashKeyFunction · 0.85
HashFunction · 0.85
forwardMethod · 0.80

Tested by

no test coverage detected