20 lines
300 B
Go
20 lines
300 B
Go
|
|
package handler
|
||
|
|
|
||
|
|
import (
|
||
|
|
"net/http"
|
||
|
|
|
||
|
|
"github.com/gin-gonic/gin"
|
||
|
|
)
|
||
|
|
|
||
|
|
type HealthCheckHandler struct{}
|
||
|
|
|
||
|
|
func (h *HealthCheckHandler) Readiness(c *gin.Context) {
|
||
|
|
c.JSON(http.StatusOK, gin.H{
|
||
|
|
"message": "pong",
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
func NewReadinessHandler() *HealthCheckHandler {
|
||
|
|
return &HealthCheckHandler{}
|
||
|
|
}
|