Full project structure following upaas conventions: uber/fx DI, go-chi routing, slog logging, Viper config. State persisted as JSON file with per-nameserver record tracking for inconsistency detection. Stub implementations for resolver, portcheck, tlscheck, and watcher.
24 lines
376 B
Go
24 lines
376 B
Go
package handlers
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
// HandleStatus returns the monitoring status handler.
|
|
func (h *Handlers) HandleStatus() http.HandlerFunc {
|
|
type response struct {
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
return func(
|
|
writer http.ResponseWriter,
|
|
request *http.Request,
|
|
) {
|
|
h.respondJSON(
|
|
writer, request,
|
|
&response{Status: "ok"},
|
|
http.StatusOK,
|
|
)
|
|
}
|
|
}
|