Merge initConfig logic to ConfigSys (#6312)

This commit is contained in:
Harshavardhana
2018-08-19 13:57:18 -07:00
committed by kannappanr
parent bf14e5ce1b
commit 7d7e21aebb
7 changed files with 84 additions and 52 deletions

View File

@@ -164,6 +164,14 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
globalServerConfig = srvCfg
globalServerConfigMu.Unlock()
var cacheConfig = globalServerConfig.GetCacheConfig()
if len(cacheConfig.Drives) > 0 {
var err error
// initialize the new disk cache objects.
globalCacheObjectAPI, err = newServerCacheObjects(cacheConfig)
logger.FatalIf(err, "Unable to initialize disk caching")
}
// Check and load SSL certificates.
var err error
globalPublicCerts, globalRootCAs, globalTLSCerts, globalIsSSL, err = getSSLConfig()