Files
headlamp-sealed-secrets-plugin/docs/api-reference/generated/hooks/useControllerHealth/functions/useControllerHealth.md
T
Chris Farhood 46d59b48b5 chore: migrate repository to privilegedescalation organization
Updated all GitHub URLs from cpfarhood to privilegedescalation organization:
- Repository URLs in package.json and Artifact Hub metadata
- Documentation links and references
- Git remote updated

No functional changes - this is purely an organizational migration.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-12 10:50:30 -05:00

1.5 KiB

Headlamp Sealed Secrets API v0.2.0


Headlamp Sealed Secrets API / hooks/useControllerHealth / useControllerHealth

Function: useControllerHealth()

useControllerHealth(autoRefresh?, refreshIntervalMs?): object

Defined in: src/hooks/useControllerHealth.ts:30

Custom hook for monitoring controller health

Automatically checks controller health on mount and can optionally refresh at a specified interval.

Parameters

autoRefresh?

boolean = false

Whether to automatically refresh health status

refreshIntervalMs?

number = 30000

Refresh interval in milliseconds (default: 30000ms = 30s)

Returns

object

Object with health status, loading state, and manual refresh function

health

health: ControllerHealthStatus

loading

loading: boolean

refresh()

refresh: () => Promise<void> = fetchHealth

Returns

Promise<void>

Example

// Manual refresh only
const { health, loading, refresh } = useControllerHealth();

// Auto-refresh every 30 seconds
const { health, loading } = useControllerHealth(true, 30000);

// Auto-refresh every 10 seconds
const { health, loading } = useControllerHealth(true, 10000);