INNER CODE UNIT · Go

watchForErrors

buildpacks-community/kpack · cmd/build-waiter/main.go:155

func watchForErrors(ctx context.Context, errFile string) {
	tickerChan := time.NewTicker(time.Second)
	defer tickerChan.Stop()

	for {
		select {
		case <-ctx.Done():
			return
		case <-tickerChan.C:
			if _, err := os.Stat(errFile); err == nil {
				log.Fatal("another step has errored")
			}
		}
	}
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…