aboutsummaryrefslogtreecommitdiff
path: root/weed/server
diff options
context:
space:
mode:
Diffstat (limited to 'weed/server')
-rw-r--r--weed/server/filer_server.go3
-rw-r--r--weed/server/master_server.go3
2 files changed, 4 insertions, 2 deletions
diff --git a/weed/server/filer_server.go b/weed/server/filer_server.go
index 96a5545f4..ca62f55e9 100644
--- a/weed/server/filer_server.go
+++ b/weed/server/filer_server.go
@@ -45,6 +45,7 @@ type FilerOption struct {
DataCenter string
DefaultLevelDbDir string
DisableHttp bool
+ Host string
Port uint32
recursiveDelete bool
Cipher bool
@@ -73,7 +74,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
glog.Fatal("master list is required!")
}
- fs.filer = filer2.NewFiler(option.Masters, fs.grpcDialOption, option.Port+10000, option.Collection, option.DefaultReplication, fs.notifyMetaListeners)
+ fs.filer = filer2.NewFiler(option.Masters, fs.grpcDialOption, option.Host, option.Port, option.Collection, option.DefaultReplication, fs.notifyMetaListeners)
fs.filer.Cipher = option.Cipher
maybeStartMetrics(fs, option)
diff --git a/weed/server/master_server.go b/weed/server/master_server.go
index d089370db..152685886 100644
--- a/weed/server/master_server.go
+++ b/weed/server/master_server.go
@@ -32,6 +32,7 @@ const (
)
type MasterOption struct {
+ Host string
Port int
MetaFolder string
VolumeSizeLimitMB uint
@@ -93,7 +94,7 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers []string) *Maste
preallocateSize: preallocateSize,
clientChans: make(map[string]chan *master_pb.VolumeLocation),
grpcDialOption: grpcDialOption,
- MasterClient: wdclient.NewMasterClient(grpcDialOption, "master", 0, peers),
+ MasterClient: wdclient.NewMasterClient(grpcDialOption, "master", option.Host, 0, peers),
}
ms.bounedLeaderChan = make(chan int, 16)