in spanner_prober/prober/proberlib.go [564:583]
func (p *Prober) Start(ctx context.Context) {
go func() {
ticker := time.NewTicker(p.probeInterval())
for {
select {
case <-ctx.Done():
// Stop probing when the context is canceled.
log.Info("Probing stopped as context is done.")
return
case <-ticker.C:
go func() {
probeCtx, cancel := context.WithTimeout(ctx, p.deadline)
defer cancel()
p.runProbe(probeCtx)
}()
}
}
}()
}