aboutsummaryrefslogtreecommitdiff
path: root/weed/server/volume_server.go
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2020-08-31 18:02:11 +0800
committerGitHub <noreply@github.com>2020-08-31 18:02:11 +0800
commit44a56b158e4637bd70d3fcf8ddc9107973b60558 (patch)
tree4cf59d290d346c6ea06d617531c90d2653f3bc03 /weed/server/volume_server.go
parentb0d6330cf44dbb0664f6ede0dbc82865879dcfe0 (diff)
parent408e339c53b9b6626e81f1c3f0f2399494bf4ce6 (diff)
downloadseaweedfs-44a56b158e4637bd70d3fcf8ddc9107973b60558.tar.xz
seaweedfs-44a56b158e4637bd70d3fcf8ddc9107973b60558.zip
Merge pull request #13 from chrislusf/master
sync
Diffstat (limited to 'weed/server/volume_server.go')
-rw-r--r--weed/server/volume_server.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go
index 3af37b491..6612e9045 100644
--- a/weed/server/volume_server.go
+++ b/weed/server/volume_server.go
@@ -31,6 +31,7 @@ type VolumeServer struct {
MetricsAddress string
MetricsIntervalSec int
fileSizeLimitBytes int64
+ SendHeartbeat bool
}
func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
@@ -66,16 +67,17 @@ 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,
}
vs.SeedMasterNodes = masterNodes
vs.store = storage.NewStore(vs.grpcDialOption, port, ip, publicUrl, folders, maxCounts, minFreeSpacePercents, vs.needleMapKind)
vs.guard = security.NewGuard(whiteList, signingKey, expiresAfterSec, readSigningKey, readExpiresAfterSec)
handleStaticResources(adminMux)
+ adminMux.HandleFunc("/status", vs.statusHandler)
if signingKey == "" || enableUiAccess {
// only expose the volume server details for safe environments
adminMux.HandleFunc("/ui/index.html", vs.uiStatusHandler)
- adminMux.HandleFunc("/status", vs.guard.WhiteList(vs.statusHandler))
/*
adminMux.HandleFunc("/stats/counter", vs.guard.WhiteList(statsCounterHandler))
adminMux.HandleFunc("/stats/memory", vs.guard.WhiteList(statsMemoryHandler))