diff options
| author | chrislusf <chris.lu@gmail.com> | 2015-02-02 10:16:50 -0800 |
|---|---|---|
| committer | chrislusf <chris.lu@gmail.com> | 2015-02-02 10:16:50 -0800 |
| commit | cc724305b665bb13a592334cf4739c4498df9d72 (patch) | |
| tree | 2c648533e945d238f2e4e681068c1e57807e917c /go/operation/lookup.go | |
| parent | 29a325626fc8b3671e4006ab7f15a13b99246f16 (diff) | |
| download | seaweedfs-cc724305b665bb13a592334cf4739c4498df9d72.tar.xz seaweedfs-cc724305b665bb13a592334cf4739c4498df9d72.zip | |
Using Url instead of PublicUrl for volume server
Originally there are only url(ip + port), and publicUrl. Because ip was
used to listen for http service, it has less flexibility and volume
server has to be accessed via publicUrl.
Recently we added ip.bind, for binding http service.
With this change, url can be used to connect to volume servers. And
publicUrl becomes a free style piece of url information, it does not
even need to be unique.
Diffstat (limited to 'go/operation/lookup.go')
| -rw-r--r-- | go/operation/lookup.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/go/operation/lookup.go b/go/operation/lookup.go index c05eb1d2b..8156c9779 100644 --- a/go/operation/lookup.go +++ b/go/operation/lookup.go @@ -72,7 +72,7 @@ func LookupFileId(server string, fileId string) (fullUrl string, err error) { if len(lookup.Locations) == 0 { return "", errors.New("File Not Found") } - return "http://" + lookup.Locations[rand.Intn(len(lookup.Locations))].PublicUrl + "/" + fileId, nil + return "http://" + lookup.Locations[rand.Intn(len(lookup.Locations))].Url + "/" + fileId, nil } // LookupVolumeIds find volume locations by cache and actual lookup |
