func()

in internal/stackdiag.go [343:353]


func (ds *diagJobState) abortAllJobs() error {
	var errs []error
	for _, j := range ds.jobs {
		if !j.Done() {
			logger.Printf("Aborting diagnostic extraction for %s %s/%s", j.Typ, ds.ns, j.ResourceName)
			// use a new context for this cleanup as the main context might have been cancelled already
			errs = append(errs, ds.terminateJob(context.Background(), j))
		}
	}
	return utilerrors.NewAggregate(errs)
}