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

Function collectNodeInformation

osscluster_test.go:212–227  ·  view source on GitHub ↗
(ctx context.Context, scenario *clusterScenario)

Source from the content-addressed store, hash-verified

210}
211
212func collectNodeInformation(ctx context.Context, scenario *clusterScenario) error {
213 for pos, port := range scenario.ports {
214 client := redis.NewClient(&redis.Options{
215 Addr: ":" + port,
216 })
217
218 myID, err := client.ClusterMyID(ctx).Result()
219 if err != nil {
220 return err
221 }
222
223 scenario.clients[port] = client
224 scenario.nodeIDs[pos] = myID
225 }
226 return nil
227}
228
229func assertSlotsEqual(slots, wanted []redis.ClusterSlot) error {
230outerLoop:

Callers 1

configureClusterTopologyFunction · 0.85

Calls 2

ResultMethod · 0.65
ClusterMyIDMethod · 0.65

Tested by

no test coverage detected