diff options
Diffstat (limited to 'go/topology/collection.go')
| -rw-r--r-- | go/topology/collection.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/go/topology/collection.go b/go/topology/collection.go index 4b47ae88a..5437ffd79 100644 --- a/go/topology/collection.go +++ b/go/topology/collection.go @@ -1,6 +1,8 @@ package topology import ( + "fmt" + "github.com/chrislusf/weed-fs/go/storage" "github.com/chrislusf/weed-fs/go/util" ) @@ -17,6 +19,10 @@ func NewCollection(name string, volumeSizeLimit uint64) *Collection { return c } +func (c *Collection) String() string { + return fmt.Sprintf("Name:%s, volumeSizeLimit:%d, storageType2VolumeLayout:%v", c.Name, c.volumeSizeLimit, c.storageType2VolumeLayout) +} + func (c *Collection) GetOrCreateVolumeLayout(rp *storage.ReplicaPlacement, ttl *storage.TTL) *VolumeLayout { keyString := rp.String() if ttl != nil { |
