Consolidate controller, move rpc package into controller - remove dangling code in pkg/server

This commit is contained in:
Harshavardhana
2015-09-15 19:38:30 -07:00
parent 8d5f6e0b96
commit 3f4b98ca4c
13 changed files with 9 additions and 36 deletions

View File

@@ -20,7 +20,6 @@ import (
"net/http"
router "github.com/gorilla/mux"
"github.com/minio/minio/pkg/rpc"
"github.com/minio/minio/pkg/server/api"
)
@@ -72,17 +71,3 @@ func getAPIHandler(conf api.Config) (http.Handler, api.Minio) {
apiHandler := registerCustomMiddleware(mux, mwHandlers...)
return apiHandler, minioAPI
}
// getRPCHandler rpc handler
func getRPCHandler() http.Handler {
s := rpc.NewServer()
s.RegisterJSONCodec()
// Add new RPC services here
return registerRPC(router.NewRouter(), s)
}
// registerRPC - register rpc handlers
func registerRPC(mux *router.Router, s *rpc.Server) http.Handler {
mux.Handle("/rpc", s)
return mux
}