|
|
@ -106,16 +106,23 @@ func configureServerHandler(srvCmdConfig serverCmdConfig) http.Handler { |
|
|
|
ObjectAPI: newObjectLayerFn, |
|
|
|
ObjectAPI: newObjectLayerFn, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Initialize Controller.
|
|
|
|
|
|
|
|
ctrlHandlers := &controllerAPIHandlers{ |
|
|
|
|
|
|
|
ObjectAPI: newObjectLayerFn, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Initialize router.
|
|
|
|
// Initialize router.
|
|
|
|
mux := router.NewRouter() |
|
|
|
mux := router.NewRouter() |
|
|
|
|
|
|
|
|
|
|
|
// Register all routers.
|
|
|
|
// Register all routers.
|
|
|
|
registerStorageRPCRouters(mux, storageRPCs) |
|
|
|
registerStorageRPCRouters(mux, storageRPCs) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Initialize distributed NS lock.
|
|
|
|
initDistributedNSLock(mux, srvCmdConfig) |
|
|
|
initDistributedNSLock(mux, srvCmdConfig) |
|
|
|
|
|
|
|
|
|
|
|
// FIXME: till net/rpc auth is brought in "minio control" can be enabled only though
|
|
|
|
// FIXME: till net/rpc auth is brought in "minio control" can be enabled only though
|
|
|
|
// this env variable.
|
|
|
|
// this env variable.
|
|
|
|
if os.Getenv("MINIO_CONTROL") != "" { |
|
|
|
if !strings.EqualFold(os.Getenv("MINIO_CONTROL"), "off") { |
|
|
|
registerControlRPCRouter(mux, ctrlHandlers) |
|
|
|
registerControlRPCRouter(mux, ctrlHandlers) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|