mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-10 13:58:24 +01:00
add shell command to list all collections
This commit is contained in:
1 parent
b92122b885
commit
657dd2e6c9
11 files changed
+589
-114
No files matched your search
@@ -117,6 +117,13 @@ func (t *Topology) GetVolumeLayout(collectionName string, rp *storage.ReplicaPla
|
||||
}).(*Collection).GetOrCreateVolumeLayout(rp, ttl)
|
||||
}
|
||||
|
||||
func (t *Topology) ListCollections() (ret []*Collection) {
|
||||
for _, c := range t.collectionMap.Items() {
|
||||
ret = append(ret, c.(*Collection))
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (t *Topology) FindCollection(collectionName string) (*Collection, bool) {
|
||||
c, hasCollection := t.collectionMap.Find(collectionName)
|
||||
if !hasCollection {
|
||||
|
||||
Reference in new issue
Block a user