Skip to content

Commit

Permalink
Liveness/readiness probes
Browse files Browse the repository at this point in the history
  • Loading branch information
federicotdn committed Dec 13, 2024
1 parent 73eb7fd commit 718a6d5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ func NewServer() (*Server, error) {
MaxAge: 300, // Maximum value not ignored by any of major browsers
}).Handler)

// Readiness probe
router.Get("/ready", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
})

// Liveness probe
router.Get("/healthz", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
})

return &Server{
traceInstaller: &TraceInstaller{},
router: router,
Expand Down

0 comments on commit 718a6d5

Please sign in to comment.