Skip to content

Commit c558557

Browse files
authored
Merge pull request #30 from joomcode/feature/INFRA-6490-instante-infos
Indicate if redis node is disconnected in InstanceInfo
2 parents dda1344 + c7ea52d commit c558557

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rediscluster/redisclusterutil/cluster.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ type InstanceInfo struct {
105105
// More probably, redis instance with other UUID were started on the same port.
106106
NoAddr bool
107107
SlaveOf string
108+
Connected bool
108109
Slots [][2]uint16
109110
Migrating []SlotMigration
110111
}
@@ -312,6 +313,7 @@ func ParseClusterNodes(res interface{}) (InstanceInfos, error) {
312313
}
313314
node.NoAddr = strings.Contains(parts[2], "noaddr")
314315
node.MySelf = strings.Contains(parts[2], "myself")
316+
node.Connected = parts[7] == "connected"
315317

316318
for _, slot := range parts[8:] {
317319
if slot[0] == '[' {

0 commit comments

Comments
 (0)