aboutsummaryrefslogtreecommitdiff
path: root/weed/wdclient/vid_map.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/wdclient/vid_map.go')
-rw-r--r--weed/wdclient/vid_map.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/weed/wdclient/vid_map.go b/weed/wdclient/vid_map.go
index 02c3efd17..aef29f56f 100644
--- a/weed/wdclient/vid_map.go
+++ b/weed/wdclient/vid_map.go
@@ -66,6 +66,15 @@ func (vc *vidMap) LookupVolumeServer(fileId string) (volumeServer string, err er
return serverUrl, nil
}
+func (vc *vidMap) GetVidLocations(vid string) (locations []Location) {
+ id, err := strconv.Atoi(vid)
+ if err != nil {
+ glog.V(1).Infof("Unknown volume id %s", vid)
+ return nil
+ }
+ return vc.GetLocations(uint32(id))
+}
+
func (vc *vidMap) GetLocations(vid uint32) (locations []Location) {
vc.RLock()
defer vc.RUnlock()