feat: add readiness probe

This commit is contained in:
mrjoelkamp
2024-07-24 14:16:20 -05:00
parent a90d2b032d
commit 48f6db779e
4 changed files with 32 additions and 12 deletions

16
pkg/handler/ready.go Normal file
View File

@@ -0,0 +1,16 @@
package handler
import (
"net/http"
)
type readyHandler struct{}
// NewReadyHandler returns a readiness probe handler.
func NewReadyHandler() (http.Handler, error) {
return &readyHandler{}, nil
}
func (h *readyHandler) ServeHTTP(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusOK)
}