1234567891011121314151617181920 |
- package handler
- import (
- "net/http"
- )
- // HealthHandler handles health check requests
- type HealthHandler struct{}
- // NewHealthHandler creates a new health handler
- func NewHealthHandler() *HealthHandler {
- return &HealthHandler{}
- }
- // Handle processes health check requests
- func (h *HealthHandler) Handle(w http.ResponseWriter, r *http.Request) {
- w.Header().Set("Content-Type", "application/json")
- w.WriteHeader(http.StatusOK)
- w.Write([]byte(`{"status":"healthy"}`))
- }
|