pub struct SystemStatus {
pub status: HealthStatus,
pub last_updated: u64,
pub health_checks: HashMap<String, HealthCheckResult>,
pub uptime_seconds: u64,
pub system_info: HashMap<String, String>,
}Expand description
System status information
Fields§
§status: HealthStatusOverall system health status
last_updated: u64Timestamp when the status was last updated
health_checks: HashMap<String, HealthCheckResult>Individual health check results
uptime_seconds: u64System uptime in seconds
system_info: HashMap<String, String>Additional system information
Implementations§
Source§impl SystemStatus
impl SystemStatus
Sourcepub fn update_status(&mut self, status: HealthStatus)
pub fn update_status(&mut self, status: HealthStatus)
Update the system status
Sourcepub fn add_health_check_result(
&mut self,
check_id: String,
result: HealthCheckResult,
)
pub fn add_health_check_result( &mut self, check_id: String, result: HealthCheckResult, )
Add a health check result
Sourcepub fn calculate_overall_status(&self) -> HealthStatus
pub fn calculate_overall_status(&self) -> HealthStatus
Get the overall health status based on individual checks
Trait Implementations§
Source§impl Clone for SystemStatus
impl Clone for SystemStatus
Source§fn clone(&self) -> SystemStatus
fn clone(&self) -> SystemStatus
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SystemStatus
impl Debug for SystemStatus
Source§impl<'de> Deserialize<'de> for SystemStatus
impl<'de> Deserialize<'de> for SystemStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SystemStatus
impl RefUnwindSafe for SystemStatus
impl Send for SystemStatus
impl Sync for SystemStatus
impl Unpin for SystemStatus
impl UnwindSafe for SystemStatus
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
Mutably borrows from an owned value. Read more