interface HealthPluginOptions
Since 0.2.0

Options for configuring the health plugin.

Properties

readonly
optional
endpoints: EndpointsOptions

Endpoint path configuration.

Defaults to { health: '/health', live: '/live', ready: '/ready' }.

readonly
optional
indicators: readonly HealthIndicatorEntry[]

Additional indicators to register.

An instance entry is registered during register(), unchanged from the pre-factory behaviour. A factory entry is resolved and registered at the start of the onInit phase — before the CAPABILITIES.HEALTH_INDICATOR contribution drain — so it can resolve a capability registered by a plugin that registers after this one. A factory that throws rejects start(), naming the option and the entry.

Defaults to [].

Since 0.5.0
readonly
optional
indicatorTimeoutMs: number

Deadline applied independently to every selected indicator, in milliseconds (M90b). Must be a positive finite number; anything else — zero, negative, NaN, Infinity — throws at plugin construction. The identical check runs in the barrel-exported HealthService constructor, so constructing the service directly cannot bypass it.

An indicator that has not settled within the deadline is recorded as { status: 'down', data: { reason: 'timeout' } }; one that rejects is recorded as { status: 'down', data: { reason: 'error' } }. Either way the report itself stays bounded, so a dead dependency can no longer leave the whole endpoint pending.

Usage

import { type HealthPluginOptions } from "health-plugin/src/index.ts";