Rename command to ready
This commit is contained in:
parent
37210ff661
commit
b342c7403c
|
@ -131,7 +131,7 @@ func Commands() []*cli.Command {
|
||||||
buildVirtualNetworkSubcommand(false),
|
buildVirtualNetworkSubcommand(false),
|
||||||
buildRunCommand(),
|
buildRunCommand(),
|
||||||
buildListCommand(),
|
buildListCommand(),
|
||||||
buildHealthCommand(),
|
buildReadyCommand(),
|
||||||
buildInfoCommand(),
|
buildInfoCommand(),
|
||||||
buildIngressSubcommand(),
|
buildIngressSubcommand(),
|
||||||
buildDeleteCommand(),
|
buildDeleteCommand(),
|
||||||
|
|
|
@ -398,10 +398,10 @@ func fmtConnections(connections []cfapi.Connection, showRecentlyDisconnected boo
|
||||||
return strings.Join(output, ", ")
|
return strings.Join(output, ", ")
|
||||||
}
|
}
|
||||||
|
|
||||||
func buildHealthCommand() *cli.Command {
|
func buildReadyCommand() *cli.Command {
|
||||||
return &cli.Command{
|
return &cli.Command{
|
||||||
Name: "health",
|
Name: "health",
|
||||||
Action: cliutil.ConfiguredAction(healthCommand),
|
Action: cliutil.ConfiguredAction(readyCommand),
|
||||||
Usage: "Tunnel health exit code",
|
Usage: "Tunnel health exit code",
|
||||||
UsageText: "cloudflared tunnel [tunnel command options] health [subcommand options]",
|
UsageText: "cloudflared tunnel [tunnel command options] health [subcommand options]",
|
||||||
Description: "cloudflared tunnel health will return proper exit code if tunnel is healthy or unhealthy",
|
Description: "cloudflared tunnel health will return proper exit code if tunnel is healthy or unhealthy",
|
||||||
|
@ -410,8 +410,8 @@ func buildHealthCommand() *cli.Command {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func healthCommand(c *cli.Context) error {
|
func readyCommand(c *cli.Context) error {
|
||||||
requestURL := fmt.Sprintf("http://%s/healthcheck", c.String("metrics"))
|
requestURL := fmt.Sprintf("http://%s/ready", c.String("metrics"))
|
||||||
res, err := http.Get(requestURL)
|
res, err := http.Get(requestURL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue