pub struct SystemHealthReport {
pub components: Vec<HealthComponentReport>,
pub duration: Option<Duration>,
}Expand description
Aggregate health report for a service instance.
Fields§
§components: Vec<HealthComponentReport>Component reports included in this health check run.
duration: Option<Duration>Total duration of the aggregate health run.
Implementations§
Source§impl SystemHealthReport
impl SystemHealthReport
Sourcepub fn new(components: Vec<HealthComponentReport>) -> Self
pub fn new(components: Vec<HealthComponentReport>) -> Self
Returns a report from component entries.
Sourcepub fn with_duration(
components: Vec<HealthComponentReport>,
duration: Duration,
) -> Self
pub fn with_duration( components: Vec<HealthComponentReport>, duration: Duration, ) -> Self
Returns a report from component entries and aggregate duration.
Sourcepub fn duration_seconds(&self) -> Option<f64>
pub fn duration_seconds(&self) -> Option<f64>
Returns aggregate duration in seconds, if present.
Sourcepub fn record_metrics<R>(&self, scope: &'static str, recorder: &R)where
R: HealthMetricsRecorder + ?Sized,
pub fn record_metrics<R>(&self, scope: &'static str, recorder: &R)where
R: HealthMetricsRecorder + ?Sized,
Records this report through a product-provided metrics bridge.
Sourcepub fn has_issues(&self) -> bool
pub fn has_issues(&self) -> bool
Returns whether any component is degraded or unhealthy.
Sourcepub fn status(&self) -> HealthStatus
pub fn status(&self) -> HealthStatus
Returns the worst status across all components.
Unhealthy dominates Degraded, and an empty report is considered
healthy because no product probe reported an issue.
Sourcepub fn details(&self) -> String
pub fn details(&self) -> String
Returns component status and diagnostic messages for every component.
Sourcepub fn issue_summary(&self) -> String
pub fn issue_summary(&self) -> String
Returns a compact summary of only degraded or unhealthy components.
When no component reports an issue, this falls back to Self::summary.
Sourcepub fn issue_details(&self) -> String
pub fn issue_details(&self) -> String
Returns diagnostic details for only degraded or unhealthy components.
When no component reports an issue, this falls back to Self::details.
Trait Implementations§
Source§impl Clone for SystemHealthReport
impl Clone for SystemHealthReport
Source§fn clone(&self) -> SystemHealthReport
fn clone(&self) -> SystemHealthReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SystemHealthReport
impl Debug for SystemHealthReport
Source§impl PartialEq for SystemHealthReport
impl PartialEq for SystemHealthReport
Source§fn eq(&self, other: &SystemHealthReport) -> bool
fn eq(&self, other: &SystemHealthReport) -> bool
self and other values to be equal, and is used by ==.impl Eq for SystemHealthReport
impl StructuralPartialEq for SystemHealthReport
Auto Trait Implementations§
impl Freeze for SystemHealthReport
impl RefUnwindSafe for SystemHealthReport
impl Send for SystemHealthReport
impl Sync for SystemHealthReport
impl Unpin for SystemHealthReport
impl UnsafeUnpin for SystemHealthReport
impl UnwindSafe for SystemHealthReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.