boot.Start(ctx, cfg)
defer boot.Stop()
- if boot.WaitReady() {
- fmt.Fprintln(stdout, boot.cluster.Services.Controller.ExternalURL)
+ if url, ok := boot.WaitReady(); ok {
+ fmt.Fprintln(stdout, url)
<-ctx.Done() // wait for signal
return 0
} else {
<-boot.done
}
-func (boot *Booter) WaitReady() bool {
+func (boot *Booter) WaitReady() (*arvados.URL, bool) {
for waiting := true; waiting; {
time.Sleep(time.Second)
if boot.ctx.Err() != nil {
- return false
+ return nil, false
}
if boot.healthChecker == nil {
// not set up yet
}
}
}
- return true
+ u := boot.cluster.Services.Controller.ExternalURL
+ return &u, true
}
func (boot *Booter) prependEnv(key, prepend string) {