Backport-3.4 exclude alarms from health check conditionally

This commit is contained in:
Chao Chen
2021-05-03 18:21:33 -07:00
parent 15715dcf1a
commit dbde4f2d5e
4 changed files with 188 additions and 8 deletions

View File

@@ -26,7 +26,7 @@ import (
// HandleHealth registers health handler on '/health'.
func HandleHealth(mux *http.ServeMux, c *clientv3.Client) {
mux.Handle(etcdhttp.PathHealth, etcdhttp.NewHealthHandler(func() etcdhttp.Health { return checkHealth(c) }))
mux.Handle(etcdhttp.PathHealth, etcdhttp.NewHealthHandler(func(excludedAlarms etcdhttp.AlarmSet) etcdhttp.Health { return checkHealth(c) }))
}
func checkHealth(c *clientv3.Client) etcdhttp.Health {