in cmd/exporter/app/server.go [134:148]
func startExporter(p *exporter.Exporter, stopCh <-chan struct{}) func(context.Context) {
// Parse patrolInterval to time.Duration
ptDuration, err := time.ParseDuration(*patrolInterval)
if err != nil {
return func(ctx context.Context) {
klog.Fatalf("an error while parsing patrol-interval, err: %s", err.Error())
ctx.Err()
}
}
return func(ctx context.Context) {
p.Run(ctx, *configMapName, *region, ptDuration, stopCh)
<-ctx.Done()
}
}