mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
Consolidate controller, move rpc package into controller - remove dangling code in pkg/server
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user