windows_exporter/internal/httphandler/health.go

22 lines
397 B
Go
Raw Normal View History

//go:build windows
2024-09-10 22:34:10 +00:00
package httphandler
import (
"net/http"
)
type HealthHandler struct{}
// Interface guard.
var _ http.Handler = (*HealthHandler)(nil)
func NewHealthHandler() HealthHandler {
return HealthHandler{}
}
func (h HealthHandler) ServeHTTP(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Content-Type", "application/json")
_, _ = w.Write([]byte(`{"status":"ok"}`))
}