Setu-TS
    Preparing search index...

    Class HealthService

    Default implementation of IHealthService.

    Manages indicator registration and aggregation for health checks.

    M90b: selected indicators run CONCURRENTLY, each raced against a runtime-owned deadline (indicatorTimeoutMs, default 5,000). Sequential awaiting multiplied outage latency — a 2-second outage across six dependency indicators took 12+ seconds, the measured X29-2 /health — and one never-settling indicator left the whole endpoint pending forever. A timeout is recorded as { status: 'down', data: { reason: 'timeout' } }, a rejection as { status: 'down', data: { reason: 'error' } } with the thrown value never serialized into the report, and a result that is not a framework result — not an object, or a status outside up/degraded/down — as { status: 'down', data: { reason: 'invalid-result' } }, so an unrecognized status can never mask another indicator's down; each indicator's latency is measured individually; and checks is assembled in registration order so the report's shape is stable even though execution is not.

    0.2.0

    Implements

    Index
    • Creates a new health service.

      Parameters

      • runtime: IRuntimeServices

        Runtime services for time and diagnostics

      • Optionaloptions: {
            indicatorTimeoutMs?: number;
            readiness?: { exclude?: readonly string[]; include?: readonly string[] };
        }

        Aggregation options

        • OptionalindicatorTimeoutMs?: number

          Per-indicator deadline in ms (default 5,000). Must be a positive finite number.

        • Optionalreadiness?: { exclude?: readonly string[]; include?: readonly string[] }

          Operator overrides of readiness membership by indicator name, applied to every registration (since 0.11.0)

          • Optional Readonlyexclude?: readonly string[]

            Force these indicators out of readiness.

            0.11.0

          • Optional Readonlyinclude?: readonly string[]

            Force these indicators into readiness.

            0.11.0

      Returns HealthService

      When indicatorTimeoutMs is not a positive finite number

      When readiness is invalid (see HealthPluginOptions.readiness)