mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-11 13:06:36 +00:00
chore: Move private packages to internal (#1664)
This commit is contained in:
19
internal/httphandler/health.go
Normal file
19
internal/httphandler/health.go
Normal file
@@ -0,0 +1,19 @@
|
||||
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"}`))
|
||||
}
|
||||
Reference in New Issue
Block a user