aboutsummaryrefslogtreecommitdiff
path: root/go/topology/collection.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/topology/collection.go')
-rw-r--r--go/topology/collection.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/go/topology/collection.go b/go/topology/collection.go
index 8042369a9..b21122d22 100644
--- a/go/topology/collection.go
+++ b/go/topology/collection.go
@@ -36,3 +36,14 @@ func (c *Collection) Lookup(vid storage.VolumeId) []*DataNode {
}
return nil
}
+
+func (c *Collection) ListVolumeServers() (nodes []*DataNode) {
+ for _, vl := range c.replicaType2VolumeLayout {
+ if vl != nil {
+ if list := vl.ListVolumeServers(); list != nil {
+ nodes = append(nodes, list...)
+ }
+ }
+ }
+ return
+}