Plugin grouping to make reading the code easier
This commit is contained in:
committed by
ncthompson
parent
92daf9191b
commit
4a72d24cdd
@@ -66,15 +66,20 @@ func main() {
|
|||||||
cli.NewCli(core.NewSubscription())
|
cli.NewCli(core.NewSubscription())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Webgui
|
||||||
gui := webui.NewWebGui(core.NewSubscription())
|
gui := webui.NewWebGui(core.NewSubscription())
|
||||||
mu := munin.NewMunin(core.NewSubscription())
|
|
||||||
prometheus.NewPrometheus(core.NewSubscription())
|
|
||||||
|
|
||||||
http.Handle("/", static.New())
|
http.Handle("/", static.New())
|
||||||
http.Handle("/ws", http.HandlerFunc(gui.ServeHub))
|
http.Handle("/ws", http.HandlerFunc(gui.ServeHub))
|
||||||
|
|
||||||
|
// Munin
|
||||||
|
mu := munin.NewMunin(core.NewSubscription())
|
||||||
http.Handle("/munin", http.HandlerFunc(mu.ServeMuninHTTP))
|
http.Handle("/munin", http.HandlerFunc(mu.ServeMuninHTTP))
|
||||||
http.Handle("/muninconfig", http.HandlerFunc(mu.ServeMuninConfigHTTP))
|
http.Handle("/muninconfig", http.HandlerFunc(mu.ServeMuninConfigHTTP))
|
||||||
|
|
||||||
|
// Prometheus
|
||||||
|
prometheus.NewPrometheus(core.NewSubscription())
|
||||||
http.Handle("/metrics", promhttp.Handler())
|
http.Handle("/metrics", promhttp.Handler())
|
||||||
|
|
||||||
log.Fatal(http.ListenAndServe(*addr, nil))
|
log.Fatal(http.ListenAndServe(*addr, nil))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user