Make metrics a requirement for tunnel ready command

This commit is contained in:
Mads Jon Nielsen 2024-11-14 18:38:17 +01:00
parent 95dff74fc8
commit c39f0ae317
1 changed files with 4 additions and 0 deletions

View File

@ -413,6 +413,10 @@ func buildReadyCommand() *cli.Command {
func readyCommand(c *cli.Context) error {
metricsOpts := c.String("metrics")
if !c.IsSet("metrics") {
return fmt.Errorf("--metrics has to be provided")
}
requestURL := fmt.Sprintf("http://%s/ready", metricsOpts)
res, err := http.Get(requestURL)
if err != nil {