less shit
This commit is contained in:
9
main.go
9
main.go
@@ -191,10 +191,11 @@ func main() {
|
|||||||
syncedServer := NewPoolServer(syncedPool, name)
|
syncedServer := NewPoolServer(syncedPool, name)
|
||||||
mux := http.NewServeMux()
|
mux := http.NewServeMux()
|
||||||
mux.Handle("/api/", http.StripPrefix("/api", syncedServer.Serve()))
|
mux.Handle("/api/", http.StripPrefix("/api", syncedServer.Serve()))
|
||||||
mux.HandleFunc("GET /add/remote/{host}", func(w http.ResponseWriter, r *http.Request) {
|
// only for local
|
||||||
syncedPool.AddRemote(r.PathValue("host"))
|
// mux.HandleFunc("GET /add/remote/{host}", func(w http.ResponseWriter, r *http.Request) {
|
||||||
})
|
// syncedPool.AddRemote(r.PathValue("host"))
|
||||||
mux.HandleFunc("GET /save", app.HandleSave)
|
// })
|
||||||
|
// mux.HandleFunc("GET /save", app.HandleSave)
|
||||||
mux.Handle("/metrics", promhttp.Handler())
|
mux.Handle("/metrics", promhttp.Handler())
|
||||||
|
|
||||||
sigs := make(chan os.Signal, 1)
|
sigs := make(chan os.Signal, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user