Documentation
    Preparing search index...

    Type Alias HealthCheckResult

    Represents the result of a single health check execution

    import { Result } from '@adonisjs/health'

    // Success result
    const result: HealthCheckResult = {
    message: 'Database connection is healthy',
    status: 'ok',
    finishedAt: new Date(),
    meta: { responseTime: 120 }
    }

    // Or using Result class
    const result2 = Result.ok('Service is running')
    .setMetaData({ uptime: 86400 })
    .toJSON()
    type HealthCheckResult = {
        message: string;
        status: "ok" | "warning" | "error";
        finishedAt: Date;
        meta?: Record<string, any>;
    }

    Implemented by

    Index

    Properties

    message: string

    A summary of the check result

    status: "ok" | "warning" | "error"

    The status of the check.

    finishedAt: Date

    Date/time when this check was completed

    meta?: Record<string, any>

    An meta-data associated with the check