mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
Add basic controller code, initiating json rpc connection getting list of disks and memstats for now.
This commit is contained in:
@@ -24,11 +24,6 @@ import (
|
||||
"github.com/minio/minio/pkg/server/rpc"
|
||||
)
|
||||
|
||||
// Get api
|
||||
func getAPI() api.Minio {
|
||||
return api.New()
|
||||
}
|
||||
|
||||
// registerAPI - register all the object API handlers to their respective paths
|
||||
func registerAPI(mux *router.Router, a api.Minio) http.Handler {
|
||||
mux.HandleFunc("/", a.ListBucketsHandler).Methods("GET")
|
||||
@@ -107,7 +102,7 @@ func registerRPC(mux *router.Router, s *rpc.Server) http.Handler {
|
||||
// getAPIHandler api handler
|
||||
func getAPIHandler(conf api.Config) (http.Handler, api.Minio) {
|
||||
mux := router.NewRouter()
|
||||
minioAPI := getAPI()
|
||||
minioAPI := api.New()
|
||||
apiHandler := registerAPI(mux, minioAPI)
|
||||
apiHandler = registerCustomMiddleware(apiHandler, conf)
|
||||
return apiHandler, minioAPI
|
||||
|
||||
Reference in New Issue
Block a user