// Run it immediately on start execute(endpoint, alertingConfig …) // Loop for the next executions for { select { case return case execute(endpoint, alertingConfig …) } }
for _, endpoint := range cfg.Endpoints { if endpoint.IsEnabled() { time.Sleep(777 * time.Millisecond) go monitor(endpoint, cfg.Alerting, cfg.Maintenance, …) } }