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

Method slotMasterNode

osscluster.go:2453–2459  ·  view source on GitHub ↗
(ctx context.Context, slot int)

Source from the content-addressed store, hash-verified

2451}
2452
2453func (c *ClusterClient) slotMasterNode(ctx context.Context, slot int) (*clusterNode, error) {
2454 state, err := c.state.Get(ctx)
2455 if err != nil {
2456 return nil, err
2457 }
2458 return state.slotMasterNode(slot)
2459}
2460
2461// SlaveForKey gets a client for a replica node to run any command on it.
2462// This is especially useful if we want to run a particular lua script which has

Callers 3

WatchMethod · 0.95
pubSubMethod · 0.95
MasterForKeyMethod · 0.95

Calls 2

GetMethod · 0.65
slotMasterNodeMethod · 0.45

Tested by

no test coverage detected