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

Function slotEqual

osscluster_test.go:242–258  ·  view source on GitHub ↗
(s1, s2 redis.ClusterSlot)

Source from the content-addressed store, hash-verified

240}
241
242func slotEqual(s1, s2 redis.ClusterSlot) bool {
243 if s1.Start != s2.Start {
244 return false
245 }
246 if s1.End != s2.End {
247 return false
248 }
249 if len(s1.Nodes) != len(s2.Nodes) {
250 return false
251 }
252 for i, n1 := range s1.Nodes {
253 if n1.Addr != s2.Nodes[i].Addr {
254 return false
255 }
256 }
257 return true
258}
259
260// ------------------------------------------------------------------------------
261

Callers 1

assertSlotsEqualFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected