aboutsummaryrefslogtreecommitdiff
path: root/weed/command/volume.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-03-07 14:45:36 -0800
committerChris Lu <chris.lu@gmail.com>2021-03-07 14:45:36 -0800
commit60686a0bb7fe138bfc16649d6df16c06fcbf65df (patch)
treef01e2911488bacb4ac9891748637e81c3fb6d672 /weed/command/volume.go
parent3b2a9c98efebdf0ef07666f6ad9a0b2169e342da (diff)
downloadseaweedfs-60686a0bb7fe138bfc16649d6df16c06fcbf65df.tar.xz
seaweedfs-60686a0bb7fe138bfc16649d6df16c06fcbf65df.zip
make tcp optional
Diffstat (limited to 'weed/command/volume.go')
-rw-r--r--weed/command/volume.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go
index cf162a732..f49ece9dc 100644
--- a/weed/command/volume.go
+++ b/weed/command/volume.go
@@ -62,6 +62,7 @@ type VolumeServerOptions struct {
preStopSeconds *int
metricsHttpPort *int
// pulseSeconds *int
+ enableTcp *bool
}
func init() {
@@ -88,6 +89,7 @@ func init() {
v.pprof = cmdVolume.Flag.Bool("pprof", false, "enable pprof http handlers. precludes --memprofile and --cpuprofile")
v.metricsHttpPort = cmdVolume.Flag.Int("metricsPort", 0, "Prometheus metrics listen port")
v.idxFolder = cmdVolume.Flag.String("dir.idx", "", "directory to store .idx files")
+ v.enableTcp = cmdVolume.Flag.Bool("tcp", false, "<exprimental> enable tcp port")
}
var cmdVolume = &Command{
@@ -252,7 +254,9 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
}
// starting tcp server
- go v.startTcpService(volumeServer)
+ if *v.enableTcp {
+ go v.startTcpService(volumeServer)
+ }
// starting the cluster http server
clusterHttpServer := v.startClusterHttpService(volumeMux)