mirror of
https://github.com/fumiama/terasu-cloudflared.git
synced 2026-06-05 09:00:23 +08:00
Use /healthcheck over /ready
This commit is contained in:
@@ -411,13 +411,13 @@ func buildHealthCommand() *cli.Command {
|
||||
}
|
||||
|
||||
func healthCommand(c *cli.Context) error {
|
||||
requestURL := fmt.Sprintf("http://%s/ready", c.String("metrics"))
|
||||
requestURL := fmt.Sprintf("http://%s/healthcheck", c.String("metrics"))
|
||||
res, err := http.Get(requestURL)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if res.StatusCode != 200 {
|
||||
return fmt.Errorf("health /ready endpoint returned status code %d", res.StatusCode)
|
||||
return fmt.Errorf("health /ready endpoint returned status code %d\n%s", res.StatusCode, res.Body)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user