HealthIndicator

Represents an abstract health indicator with common functionalities

See more...

  
abstract class HealthIndicator {
  protected getStatus(key: string, isHealthy: boolean, data?: { [key: string]: any; }): HealthIndicatorResult
}

See also

Methods

getStatus()

Generates the health indicator result object


protected getStatus(key: string, isHealthy: boolean, data?: { [key: string]: any; }): HealthIndicatorResult

Parameters

Option Type Description
key string

The key which will be used as key for the result object

isHealthy boolean

Whether the health indicator is healthy

data object

Additional data which will get appended to the result object


Optional. Default is `undefined`.

Returns

HealthIndicatorResult

Description

A custom HealthIndicator should inherit the HealthIndicator class.