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.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/wdclient/vid_map.go b/weed/wdclient/vid_map.go
index 271baa132..670d1ad77 100644
--- a/weed/wdclient/vid_map.go
+++ b/weed/wdclient/vid_map.go
@@ -3,6 +3,7 @@ package wdclient
import (
"errors"
"fmt"
+ "github.com/chrislusf/seaweedfs/weed/pb"
"strconv"
"strings"
"sync"
@@ -25,6 +26,11 @@ type Location struct {
Url string `json:"url,omitempty"`
PublicUrl string `json:"publicUrl,omitempty"`
DataCenter string `json:"dataCenter,omitempty"`
+ GrpcPort int `json:"grpcPort,omitempty"`
+}
+
+func (l Location) ServerAddress() pb.ServerAddress {
+ return pb.NewServerAddressWithGrpcPort(l.Url, l.GrpcPort)
}
type vidMap struct {