INNER CODE UNIT · Go

shutdownTelemetry

helmfile/helmfile · main.go:59

func shutdownTelemetry(runErr error, exitCode int) {
	ctx, cancel := gocontext.WithTimeout(gocontext.Background(), telemetry.ShutdownTimeout)
	defer cancel()
	_ = telemetry.Shutdown(ctx, runErr, exitCode)
}

// signalExitCode maps termination signals to conventional exit codes, matching
// the os.Exit calls in main.
func signalExitCode(sig os.Signal) int {
	switch sig {
	case syscall.SIGINT:
		return 130
	case syscall.SIGTERM:
		return 143
	default:
		return 1
	}
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…