MCPcopy
hub / github.com/redis/go-redis / cmdSlot

Method cmdSlot

osscluster.go:2361–2364  ·  view source on GitHub ↗
(cmd Cmder, prefferedSlot int)

Source from the content-addressed store, hash-verified

2359}
2360
2361func (c *ClusterClient) cmdSlot(cmd Cmder, prefferedSlot int) int {
2362 info := c.cmdInfoPeek(cmd.Name())
2363 return c.cmdSlotWithPos(cmd, cmdFirstKeyPosWithInfo(cmd, info), prefferedSlot)
2364}
2365
2366// cmdSlotWithPos computes the cluster slot for cmd given a pre-resolved first key
2367// position. Separating pos resolution from slot computation lets callers that

Callers 3

processMethod · 0.95
mapCmdsByNodeMethod · 0.95
internal_test.goFile · 0.80

Calls 4

cmdInfoPeekMethod · 0.95
cmdSlotWithPosMethod · 0.95
cmdFirstKeyPosWithInfoFunction · 0.85
NameMethod · 0.65

Tested by

no test coverage detected