|
@ -38,6 +38,7 @@ type VolumeServer struct { |
|
|
func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, |
|
|
func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, |
|
|
port int, publicUrl string, |
|
|
port int, publicUrl string, |
|
|
folders []string, maxCounts []int, minFreeSpacePercents []float32, |
|
|
folders []string, maxCounts []int, minFreeSpacePercents []float32, |
|
|
|
|
|
idxFolder string, |
|
|
needleMapKind storage.NeedleMapType, |
|
|
needleMapKind storage.NeedleMapType, |
|
|
masterNodes []string, pulseSeconds int, |
|
|
masterNodes []string, pulseSeconds int, |
|
|
dataCenter string, rack string, |
|
|
dataCenter string, rack string, |
|
@ -75,7 +76,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, |
|
|
|
|
|
|
|
|
vs.checkWithMaster() |
|
|
vs.checkWithMaster() |
|
|
|
|
|
|
|
|
vs.store = storage.NewStore(vs.grpcDialOption, port, ip, publicUrl, folders, maxCounts, minFreeSpacePercents, vs.needleMapKind) |
|
|
|
|
|
|
|
|
vs.store = storage.NewStore(vs.grpcDialOption, port, ip, publicUrl, folders, maxCounts, minFreeSpacePercents, idxFolder, vs.needleMapKind) |
|
|
vs.guard = security.NewGuard(whiteList, signingKey, expiresAfterSec, readSigningKey, readExpiresAfterSec) |
|
|
vs.guard = security.NewGuard(whiteList, signingKey, expiresAfterSec, readSigningKey, readExpiresAfterSec) |
|
|
|
|
|
|
|
|
handleStaticResources(adminMux) |
|
|
handleStaticResources(adminMux) |
|
|