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

Method slotMasterNode

osscluster.go:927–933  ·  view source on GitHub ↗
(slot int)

Source from the content-addressed store, hash-verified

925}
926
927func (c *clusterState) slotMasterNode(slot int) (*clusterNode, error) {
928 nodes := c.slotNodes(slot)
929 if len(nodes) > 0 {
930 return nodes[0], nil
931 }
932 return c.nodes.Random()
933}
934
935func (c *clusterState) slotSlaveNode(slot int) (*clusterNode, error) {
936 nodes := c.slotNodes(slot)

Callers 5

mapCmdsByNodeMethod · 0.45
processTxPipelineMethod · 0.45
cmdNodeMethod · 0.45
slotMasterNodeMethod · 0.45

Calls 2

slotNodesMethod · 0.95
RandomMethod · 0.45

Tested by

no test coverage detected