aboutsummaryrefslogtreecommitdiff
path: root/weed/command/master.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-03-02 05:10:05 -0800
committerChris Lu <chris.lu@gmail.com>2019-03-02 05:10:05 -0800
commit2812c14520b75b0f89195108c8c54424587f0d6d (patch)
treebf34af63a1a5887992b347ff7c75353fbb8a4d78 /weed/command/master.go
parent572d986deefe1d04163db4488ce2b33a52190a75 (diff)
downloadseaweedfs-2812c14520b75b0f89195108c8c54424587f0d6d.tar.xz
seaweedfs-2812c14520b75b0f89195108c8c54424587f0d6d.zip
master: add option to disable http operations
Diffstat (limited to 'weed/command/master.go')
-rw-r--r--weed/command/master.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/command/master.go b/weed/command/master.go
index 9a0ae7eb4..cc6818967 100644
--- a/weed/command/master.go
+++ b/weed/command/master.go
@@ -47,6 +47,7 @@ var (
mMaxCpu = cmdMaster.Flag.Int("maxCpu", 0, "maximum number of CPUs. 0 means all available CPUs")
garbageThreshold = cmdMaster.Flag.Float64("garbageThreshold", 0.3, "threshold to vacuum and reclaim spaces")
masterWhiteListOption = cmdMaster.Flag.String("whiteList", "", "comma separated Ip addresses having write permission. No limit if empty.")
+ httpReadOnly = cmdMaster.Flag.Bool("httpReadOnly", false, "disable http operations, only gRPC operations are allowed.")
masterCpuProfile = cmdMaster.Flag.String("cpuprofile", "", "cpu profile output file")
masterMemProfile = cmdMaster.Flag.String("memprofile", "", "memory profile output file")
@@ -78,6 +79,7 @@ func runMaster(cmd *Command, args []string) bool {
*volumeSizeLimitMB, *volumePreallocate,
*mpulse, *defaultReplicaPlacement, *garbageThreshold,
masterWhiteList,
+ *httpReadOnly,
)
listeningAddress := *masterBindIp + ":" + strconv.Itoa(*mport)