aboutsummaryrefslogtreecommitdiff
path: root/weed/server/volume_server.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-13 03:11:24 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-13 03:11:24 -0800
commitd156c74ec097add1954fa2a0a9a55eb02b44bb0e (patch)
tree872edef3665d27b852631303f031aa97470f4ad5 /weed/server/volume_server.go
parente9cd798bd372741753efcba2af594b00fe7b8437 (diff)
downloadseaweedfs-d156c74ec097add1954fa2a0a9a55eb02b44bb0e.tar.xz
seaweedfs-d156c74ec097add1954fa2a0a9a55eb02b44bb0e.zip
volume server set volume type and heartbeat to the master
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 468f75890..16f4198e8 100644
--- a/weed/server/volume_server.go
+++ b/weed/server/volume_server.go
@@ -20,6 +20,7 @@ type VolumeServer struct {
pulseSeconds int
dataCenter string
rack string
+ VolumeType storage.VolumeType
store *storage.Store
guard *security.Guard
grpcDialOption grpc.DialOption
@@ -38,7 +39,7 @@ type VolumeServer struct {
func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
port int, publicUrl string,
folders []string, maxCounts []int, minFreeSpacePercents []float32,
- idxFolder string,
+ idxFolder string, volumeType storage.VolumeType,
needleMapKind storage.NeedleMapType,
masterNodes []string, pulseSeconds int,
dataCenter string, rack string,
@@ -63,6 +64,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
pulseSeconds: pulseSeconds,
dataCenter: dataCenter,
rack: rack,
+ VolumeType: volumeType,
needleMapKind: needleMapKind,
FixJpgOrientation: fixJpgOrientation,
ReadRedirect: readRedirect,
@@ -76,7 +78,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
vs.checkWithMaster()
- vs.store = storage.NewStore(vs.grpcDialOption, port, ip, publicUrl, folders, maxCounts, minFreeSpacePercents, idxFolder, vs.needleMapKind)
+ vs.store = storage.NewStore(vs.grpcDialOption, port, ip, publicUrl, folders, maxCounts, minFreeSpacePercents, idxFolder, vs.needleMapKind, vs.VolumeType)
vs.guard = security.NewGuard(whiteList, signingKey, expiresAfterSec, readSigningKey, readExpiresAfterSec)
handleStaticResources(adminMux)