@darthcav/ts-http-server
    Preparing search index...

    Type Alias HealthCheck

    A named dependency health check evaluated by the default /health route.

    Checks run concurrently on every request. A check that throws is reported as fail with the error message in output. The overall service status is the worst of all check statuses (fail > warn > pass).

    type HealthCheck = {
        name: string;
        run: () => HealthCheckResult | Promise<HealthCheckResult>;
    }
    Index

    Properties

    Properties

    name: string

    Component identifier, conventionally componentName:measurementName (e.g. database:responseTime). Checks sharing a name are grouped into the same array in the checks object.

    run: () => HealthCheckResult | Promise<HealthCheckResult>

    Produces the check result; may be async. Thrown errors map to fail.