This commit is contained in:
winfredwz 2025-05-03 17:05:19 +00:00 committed by GitHub
commit 690925723a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -166,6 +166,13 @@ func main() {
}
http.HandleFunc("/probe", handleProbe(logger, excludedDatabases))
http.HandleFunc("/-/reload", func(w http.ResponseWriter, r *http.Request) {
if err := c.ReloadConfig(*configFile, logger); err != nil {
level.Warn(logger).Log("msg", "Error reloading config", "file", *configFile, "error", err)
return
}
_, _ = w.Write([]byte(`ok`))
})
srv := &http.Server{}
if err := web.ListenAndServe(srv, webConfig, logger); err != nil {