aboutsummaryrefslogtreecommitdiff
path: root/weed/server/volume_server.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-09-13 21:25:51 -0700
committerChris Lu <chris.lu@gmail.com>2020-09-13 21:25:51 -0700
commit5d6753fb984c4ea4ee9e3b427cb468916d0b07fb (patch)
tree55317a3245f5202f83601f4dfbfe21dd711a7739 /weed/server/volume_server.go
parent1af95c5b76d528ca8532e845305719818435df83 (diff)
downloadseaweedfs-5d6753fb984c4ea4ee9e3b427cb468916d0b07fb.tar.xz
seaweedfs-5d6753fb984c4ea4ee9e3b427cb468916d0b07fb.zip
shell: add volumeServer.leave command
Diffstat (limited to 'weed/server/volume_server.go')
-rw-r--r--weed/server/volume_server.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go
index 6612e9045..e9d815579 100644
--- a/weed/server/volume_server.go
+++ b/weed/server/volume_server.go
@@ -31,7 +31,8 @@ type VolumeServer struct {
MetricsAddress string
MetricsIntervalSec int
fileSizeLimitBytes int64
- SendHeartbeat bool
+ isHeartbeating bool
+ stopChan chan bool
}
func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
@@ -67,7 +68,8 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
grpcDialOption: security.LoadClientTLS(util.GetViper(), "grpc.volume"),
compactionBytePerSecond: int64(compactionMBPerSecond) * 1024 * 1024,
fileSizeLimitBytes: int64(fileSizeLimitMB) * 1024 * 1024,
- SendHeartbeat: true,
+ isHeartbeating: true,
+ stopChan: make(chan bool),
}
vs.SeedMasterNodes = masterNodes
vs.store = storage.NewStore(vs.grpcDialOption, port, ip, publicUrl, folders, maxCounts, minFreeSpacePercents, vs.needleMapKind)