RpcHealthStatus class
Snapshot of a component's health.
Used as the result of health().
Constructors
-
RpcHealthStatus({required String component, required RpcHealthLevel level, String? message, Map<
String, Object?> ? details, DateTime? timestamp}) -
Creates an RpcHealthStatus for the given
componentandlevel. -
RpcHealthStatus.closed({required String component, String message = 'Component closed', Map<
String, Object?> ? details}) -
Builds a status for a closed component.
factory
-
RpcHealthStatus.degraded({required String component, String message = 'Component degraded', Map<
String, Object?> ? details}) -
Builds a status for a degraded component.
factory
-
RpcHealthStatus.healthy({required String component, String message = 'Component healthy', Map<
String, Object?> ? details}) -
Builds a status for a healthy component.
factory
-
RpcHealthStatus.reconnecting({required String component, String message = 'Component reconnecting', Map<
String, Object?> ? details}) -
Builds a status for a reconnecting component.
factory
-
RpcHealthStatus.unhealthy({required String component, String message = 'Component unhealthy', Map<
String, Object?> ? details}) -
Builds a status for an unhealthy component.
factory
Properties
- component → String
-
Component name for which the status was produced.
final
-
details
→ Map<
String, Object?> -
Additional diagnostic data.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isHealthy → bool
-
Returns true when the component is fully operational without degradation.
no setter
- level → RpcHealthLevel
-
Current health level.
final
- message → String
-
Brief description of the state.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timestamp → DateTime
-
Timestamp when the snapshot was taken.
final
Methods
-
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