INNER CODE UNIT · Go

minUnhealthyTime

vladimirvivien/ktop · application/app_ctrl.go:610

	const minUnhealthyTime = 5 * time.Second // Must be unhealthy for at least 5s before recovery

	// Update header immediately
	nsDisplay := app.getNamespaceDisplay()
	app.panel.DrawHeader(app.buildHeaderString(nsDisplay))

	if healthy {
		app.metricsConsecOK++

		// Check debouncing conditions before declaring recovered
		if !app.lastHealthyState {
			// For initial startup (never had an error), accept first success immediately.
			// For recovery after error, apply debouncing to prevent flapping.
			// The health callback only fires on state changes, so debouncing that
			// requires multiple callbacks won't work for initial startup.
			isInitialStartup := app.metricsLastErrorTime.IsZero()

			if !isInitialStartup {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…