Skip to content

Commit

Permalink
Rename health check endpoint (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
benbjohnson authored Aug 11, 2023
1 parent ebedf26 commit aec3002
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions http/proxy_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ func (s *ProxyServer) serveHTTP(w http.ResponseWriter, r *http.Request) {
}

// Handle health check endpoint.
if r.Method == http.MethodGet && r.URL.Path == "/litefs/healthz" {
s.serveGetHealthz(w, r)
if r.Method == http.MethodGet && r.URL.Path == "/litefs/health" {
s.serveGetHealth(w, r)
return
}

Expand All @@ -189,7 +189,7 @@ func (s *ProxyServer) serveHTTP(w http.ResponseWriter, r *http.Request) {
}
}

func (s *ProxyServer) serveGetHealthz(w http.ResponseWriter, r *http.Request) {
func (s *ProxyServer) serveGetHealth(w http.ResponseWriter, r *http.Request) {
lag := s.store.Lag()
if s.MaxLag > 0 && lag > s.MaxLag {
s.logf("proxy: %s %s: current replication lag of %s exceeds maximum threshold of %s", r.Method, r.URL.Path, lag, s.MaxLag)
Expand Down

0 comments on commit aec3002

Please sign in to comment.