Refactor Heal RPC and add Shutdown RPC (#2488)

This commit is contained in:
Anis Elleuch
2016-08-21 20:06:53 +01:00
committed by Harshavardhana
parent 975eb31973
commit 07506358ff
8 changed files with 312 additions and 132 deletions

View File

@@ -69,6 +69,11 @@ func configureServerHandler(srvCmdConfig serverCmdConfig) http.Handler {
ObjectAPI: objAPI,
}
// Initialize Controller.
ctrlHandlers := &controllerAPIHandlers{
ObjectAPI: objAPI,
}
// Initialize and monitor shutdown signals.
err = initGracefulShutdown(os.Exit)
fatalIf(err, "Unable to initialize graceful shutdown operation")
@@ -98,7 +103,7 @@ func configureServerHandler(srvCmdConfig serverCmdConfig) http.Handler {
// FIXME: till net/rpc auth is brought in "minio control" can be enabled only though
// this env variable.
if os.Getenv("MINIO_CONTROL") != "" {
registerControlRPCRouter(mux, objAPI)
registerControlRPCRouter(mux, ctrlHandlers)
}
// set environmental variable MINIO_BROWSER=off to disable minio web browser.