aboutsummaryrefslogtreecommitdiff
path: root/weed/server/volume_server.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-13 22:49:56 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-13 22:49:56 -0800
commitf6a419c26caf6356df1a099c5a900b158807b5a4 (patch)
treebbe4116c6800e5a93cfd2214725ec25041523d3d /weed/server/volume_server.go
parent7c52a3594219fa0957e39a32917cffd0ea479f72 (diff)
downloadseaweedfs-f6a419c26caf6356df1a099c5a900b158807b5a4.tar.xz
seaweedfs-f6a419c26caf6356df1a099c5a900b158807b5a4.zip
disk type configurable for each folder
Diffstat (limited to 'weed/server/volume_server.go')
-rw-r--r--weed/server/volume_server.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go
index f88c84184..7c731763b 100644
--- a/weed/server/volume_server.go
+++ b/weed/server/volume_server.go
@@ -20,7 +20,6 @@ type VolumeServer struct {
pulseSeconds int
dataCenter string
rack string
- DiskType storage.DiskType
store *storage.Store
guard *security.Guard
grpcDialOption grpc.DialOption
@@ -38,7 +37,7 @@ type VolumeServer struct {
func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
port int, publicUrl string,
- folders []string, maxCounts []int, minFreeSpacePercents []float32, diskType storage.DiskType,
+ folders []string, maxCounts []int, minFreeSpacePercents []float32, diskTypes []storage.DiskType,
idxFolder string,
needleMapKind storage.NeedleMapType,
masterNodes []string, pulseSeconds int,
@@ -64,7 +63,6 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
pulseSeconds: pulseSeconds,
dataCenter: dataCenter,
rack: rack,
- DiskType: diskType,
needleMapKind: needleMapKind,
FixJpgOrientation: fixJpgOrientation,
ReadRedirect: readRedirect,
@@ -78,7 +76,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.DiskType)
+ vs.store = storage.NewStore(vs.grpcDialOption, port, ip, publicUrl, folders, maxCounts, minFreeSpacePercents, idxFolder, vs.needleMapKind, diskTypes)
vs.guard = security.NewGuard(whiteList, signingKey, expiresAfterSec, readSigningKey, readExpiresAfterSec)
handleStaticResources(adminMux)