aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/volume_info.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/storage/volume_info.go')
-rw-r--r--weed/storage/volume_info.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/storage/volume_info.go b/weed/storage/volume_info.go
index 6a33aa261..3b9b667eb 100644
--- a/weed/storage/volume_info.go
+++ b/weed/storage/volume_info.go
@@ -64,6 +64,10 @@ func NewVolumeInfoFromShort(m *master_pb.VolumeShortInformationMessage) (vi Volu
return vi, nil
}
+func (vi VolumeInfo) IsRemote() bool {
+ return vi.RemoteStorageName != ""
+}
+
func (vi VolumeInfo) String() string {
return fmt.Sprintf("Id:%d, Size:%d, ReplicaPlacement:%s, Collection:%s, Version:%v, FileCount:%d, DeleteCount:%d, DeletedByteCount:%d, ReadOnly:%v",
vi.Id, vi.Size, vi.ReplicaPlacement, vi.Collection, vi.Version, vi.FileCount, vi.DeleteCount, vi.DeletedByteCount, vi.ReadOnly)