Skip to main content

Class: HealthController

A controller for handling health check endpoints.

Constructors​

Constructor​

new HealthController(healthEngine): HealthController

Parameters​

healthEngine​

HealthEngine

Returns​

HealthController

Methods​

getHealth()​

getHealth(response): Promise<HandledResult>

Gets the health status of the application.

Parameters​

response​

HttpResponse

The HTTP response object.

Returns​

Promise<HandledResult>

A promise resolving to the handled result.


getLiveness()​

getLiveness(): Promise<{ status: HealthStatus; timestamp: string; }>

Gets the liveness status of the application.

Returns​

Promise<{ status: HealthStatus; timestamp: string; }>

A promise resolving to the liveness status.


getReadiness()​

getReadiness(): Promise<{ status: HealthStatus; timestamp: string; }>

Gets the readiness status of the application.

Returns​

Promise<{ status: HealthStatus; timestamp: string; }>

A promise resolving to the readiness status.