|
@ -37,9 +37,6 @@ type MasterOptions struct { |
|
|
disableHttp *bool |
|
|
disableHttp *bool |
|
|
metricsAddress *string |
|
|
metricsAddress *string |
|
|
metricsIntervalSec *int |
|
|
metricsIntervalSec *int |
|
|
|
|
|
|
|
|
sequencerType *string |
|
|
|
|
|
etcdUrls *string |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func init() { |
|
|
func init() { |
|
@ -58,9 +55,6 @@ func init() { |
|
|
m.disableHttp = cmdMaster.Flag.Bool("disableHttp", false, "disable http requests, only gRPC operations are allowed.") |
|
|
m.disableHttp = cmdMaster.Flag.Bool("disableHttp", false, "disable http requests, only gRPC operations are allowed.") |
|
|
m.metricsAddress = cmdMaster.Flag.String("metrics.address", "", "Prometheus gateway address") |
|
|
m.metricsAddress = cmdMaster.Flag.String("metrics.address", "", "Prometheus gateway address") |
|
|
m.metricsIntervalSec = cmdMaster.Flag.Int("metrics.intervalSeconds", 15, "Prometheus push interval in seconds") |
|
|
m.metricsIntervalSec = cmdMaster.Flag.Int("metrics.intervalSeconds", 15, "Prometheus push interval in seconds") |
|
|
m.sequencerType = cmdMaster.Flag.String("sequencerType", "memory", "Choose [memory|etcd] type for store the file sequence") |
|
|
|
|
|
m.etcdUrls = cmdMaster.Flag.String("etcdUrls", "", |
|
|
|
|
|
"when sequencerType=etcd, set etcdUrls for etcd cluster that store file sequence, example : http://127.0.0.1:2379,http://127.0.0.1:2389") |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var cmdMaster = &Command{ |
|
|
var cmdMaster = &Command{ |
|
@ -84,6 +78,7 @@ func runMaster(cmd *Command, args []string) bool { |
|
|
|
|
|
|
|
|
util.LoadConfiguration("security", false) |
|
|
util.LoadConfiguration("security", false) |
|
|
util.LoadConfiguration("master", false) |
|
|
util.LoadConfiguration("master", false) |
|
|
|
|
|
glog.V(0).Infof("%v", viper.GetViper().GetString("master.maintenance.scripts")) |
|
|
|
|
|
|
|
|
runtime.GOMAXPROCS(runtime.NumCPU()) |
|
|
runtime.GOMAXPROCS(runtime.NumCPU()) |
|
|
util.SetupProfiling(*masterCpuProfile, *masterMemProfile) |
|
|
util.SetupProfiling(*masterCpuProfile, *masterMemProfile) |
|
|