mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
refactor: move driver handlers to own file
This commit is contained in:
9
main.go
9
main.go
@@ -42,14 +42,7 @@ func main() {
|
||||
}
|
||||
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/Plugin.Activate", driver.Activate)
|
||||
mux.HandleFunc("/VolumeDriver.Create", driver.Create)
|
||||
mux.HandleFunc("/VolumeDriver.Remove", driver.Remove)
|
||||
mux.HandleFunc("/VolumeDriver.Mount", driver.Mount)
|
||||
mux.HandleFunc("/VolumeDriver.Unmount", driver.Unmount)
|
||||
mux.HandleFunc("/VolumeDriver.Path", driver.Path)
|
||||
mux.HandleFunc("/VolumeDriver.Get", driver.Get)
|
||||
mux.HandleFunc("/VolumeDriver.List", driver.List)
|
||||
driver.SetupHandlers(mux)
|
||||
|
||||
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Error(w, "Not Found", http.StatusNotFound)
|
||||
|
||||
Reference in New Issue
Block a user