Skip to content

Commit aec3002

Browse files
authored
Rename health check endpoint (#384)
1 parent ebedf26 commit aec3002

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

http/proxy_server.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ func (s *ProxyServer) serveHTTP(w http.ResponseWriter, r *http.Request) {
174174
}
175175

176176
// Handle health check endpoint.
177-
if r.Method == http.MethodGet && r.URL.Path == "/litefs/healthz" {
178-
s.serveGetHealthz(w, r)
177+
if r.Method == http.MethodGet && r.URL.Path == "/litefs/health" {
178+
s.serveGetHealth(w, r)
179179
return
180180
}
181181

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

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

0 commit comments

Comments
 (0)