DatabaseHealthIndicator class

A HealthIndicator that reports database connectivity by running a trivial query. Register it as a provider (@Component) and it is picked up by Diana's /actuator/health endpoint like any other indicator.

@Component()
class DbHealth extends DatabaseHealthIndicator {
  DbHealth(super.db);
}

Constructors

DatabaseHealthIndicator(Database _db)

Properties

hashCode → int
The hash code for this object.
no setterinherited
name → String
Component name in the aggregated response.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

health() → Future<HealthStatus>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited