Node endpoints with container handling (#1)
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"simple-cluster-node/health"
|
||||
"simple-cluster-node/node"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/gorilla/mux"
|
||||
@@ -14,15 +15,11 @@ import (
|
||||
func SetupRouter() *mux.Router {
|
||||
r := mux.NewRouter()
|
||||
r.Use(identifyRequest, corsCheck, logRequest)
|
||||
r.HandleFunc("/health", health.Handle).Methods("GET", "OPTIONS")
|
||||
|
||||
/*
|
||||
r.HandleFunc("/album", handler.GetAlbums).Methods("GET", "OPTIONS")
|
||||
r.HandleFunc("/album", handler.SaveAlbum).Methods("POST", "OPTIONS")
|
||||
r.HandleFunc("/album/{albumId}", handler.DeleteAlbum).Methods("DELETE", "OPTIONS")
|
||||
r.HandleFunc("/album/{albumId}", handler.GetAlbum).Methods("GET", "OPTIONS")
|
||||
r.HandleFunc("/shareAlbum/{albumId}/{userId}", handler.ShareAlbum).Methods("POST", "OPTIONS")
|
||||
*/
|
||||
r.HandleFunc("/health", health.Handle).Methods("GET", "OPTIONS")
|
||||
r.HandleFunc("/node/info", node.HandleInfo).Methods("GET", "OPTIONS")
|
||||
r.HandleFunc("/node/start", node.HandleStart).Methods("POST", "OPTIONS")
|
||||
r.HandleFunc("/node/stop", node.HandleStop).Methods("POST", "OPTIONS")
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user