Adjust command line options.

1. switch to use -publicIp instead of -publicUrl
2. -ip can be empty. It will listen to all available interfaces.
3. For "weed master", these options are changed:
  -masterPort => -master.port
  -peers => -master.peers
  -mdir => -master.dir
  -volumeSizeLimitMB => -master.volumeSizeLimitMB
  -conf => -master.conf
  -defaultReplicaPlacement => -master.defaultReplicaPlacement
  -port => -volume.port
  -max => -volume.max
This commit is contained in:
Chris Lu
2014-04-25 22:09:42 -07:00
parent 8c04c5ed5f
commit d344e87de0
4 changed files with 61 additions and 42 deletions

View File

@@ -5,6 +5,7 @@ import (
"code.google.com/p/weed-fs/go/storage"
"math/rand"
"net/http"
"strconv"
"time"
)
@@ -17,10 +18,11 @@ type VolumeServer struct {
store *storage.Store
}
func NewVolumeServer(r *http.ServeMux, ip string, port int, publicUrl string, folders []string, maxCounts []int,
func NewVolumeServer(r *http.ServeMux, ip string, port int, publicIp string, folders []string, maxCounts []int,
masterNode string, pulseSeconds int,
dataCenter string, rack string,
whiteList []string) *VolumeServer {
publicUrl := publicIp + ":" + strconv.Itoa(port)
vs := &VolumeServer{
masterNode: masterNode,
pulseSeconds: pulseSeconds,