pub struct StatusReporter {
runtime: Arc<ApplicationRunTime>,
ipc_server: Option<Arc<TauriIPCServer>>,
status_history: Arc<Mutex<Vec<IPCStatusReport>>>,
start_time: SystemTime,
error_count: Arc<Mutex<u32>>,
performance_metrics: Arc<Mutex<PerformanceMetrics>>,
health_monitor: Arc<Mutex<HealthMonitor>>,
service_registry: Arc<RwLock<ServiceRegistry>>,
discovered_services: Arc<RwLock<HashSet<String>>>,
}Expand description
Status reporter for IPC communication
Fields§
§runtime: Arc<ApplicationRunTime>§ipc_server: Option<Arc<TauriIPCServer>>§status_history: Arc<Mutex<Vec<IPCStatusReport>>>§start_time: SystemTime§error_count: Arc<Mutex<u32>>§performance_metrics: Arc<Mutex<PerformanceMetrics>>§health_monitor: Arc<Mutex<HealthMonitor>>§service_registry: Arc<RwLock<ServiceRegistry>>§discovered_services: Arc<RwLock<HashSet<String>>>Implementations§
Source§impl StatusReporter
impl StatusReporter
Sourcepub fn new(runtime: Arc<ApplicationRunTime>) -> Self
pub fn new(runtime: Arc<ApplicationRunTime>) -> Self
Create a new status reporter
Sourcepub fn set_ipc_server(&mut self, ipc_server: Arc<TauriIPCServer>)
pub fn set_ipc_server(&mut self, ipc_server: Arc<TauriIPCServer>)
Set the IPC server instance
Sourcepub async fn generate_status_report(&self) -> Result<IPCStatusReport, String>
pub async fn generate_status_report(&self) -> Result<IPCStatusReport, String>
Generate a status report
Sourcepub async fn report_to_sky(&self) -> Result<(), String>
pub async fn report_to_sky(&self) -> Result<(), String>
STATUS REPORTING: Microsoft-inspired comprehensive reporting
Sourcepub async fn start_periodic_reporting(
&self,
interval_seconds: u64,
) -> Result<(), String>
pub async fn start_periodic_reporting( &self, interval_seconds: u64, ) -> Result<(), String>
Start periodic status reporting
Sourcepub fn record_error(&self)
pub fn record_error(&self)
Record an error
Sourcepub fn get_status_history(&self) -> Result<Vec<IPCStatusReport>, String>
pub fn get_status_history(&self) -> Result<Vec<IPCStatusReport>, String>
Get status history
Sourcepub fn get_start_time(&self) -> SystemTime
pub fn get_start_time(&self) -> SystemTime
Get the start time
Sourcepub async fn update_performance_metrics(&self) -> Result<(), String>
pub async fn update_performance_metrics(&self) -> Result<(), String>
PERFORMANCE MONITORING: Microsoft-inspired performance tracking
Sourcepub async fn perform_health_check(&self) -> Result<(), String>
pub async fn perform_health_check(&self) -> Result<(), String>
HEALTH MONITORING: Microsoft-inspired health checks
Sourceasync fn calculate_message_rate(&self) -> f64
async fn calculate_message_rate(&self) -> f64
METRICS CALCULATION: Microsoft-inspired performance algorithms
async fn calculate_average_latency(&self) -> f64
async fn calculate_peak_latency(&self) -> f64
async fn calculate_compression_ratio(&self) -> f64
async fn calculate_pool_utilization(&self, stats: &ConnectionStats) -> f64
async fn get_memory_usage(&self) -> f64
async fn get_cpu_usage(&self) -> f64
Sourcepub async fn discover_services(&self) -> Result<Vec<ServiceInfo>, String>
pub async fn discover_services(&self) -> Result<Vec<ServiceInfo>, String>
SERVICE DISCOVERY: Discover available Mountain services
Sourcefn get_service_dependencies(&self, service_name: &str) -> Vec<String>
fn get_service_dependencies(&self, service_name: &str) -> Vec<String>
Get service dependencies
Sourceasync fn calculate_service_response_time(&self, service_name: &str) -> f64
async fn calculate_service_response_time(&self, service_name: &str) -> f64
Calculate service response time
Sourceasync fn calculate_service_error_rate(&self, service_name: &str) -> f64
async fn calculate_service_error_rate(&self, service_name: &str) -> f64
Calculate service error rate
Sourceasync fn calculate_service_throughput(&self, service_name: &str) -> f64
async fn calculate_service_throughput(&self, service_name: &str) -> f64
Calculate service throughput
Sourceasync fn get_service_memory_usage(&self, service_name: &str) -> f64
async fn get_service_memory_usage(&self, service_name: &str) -> f64
Get service memory usage
Sourceasync fn get_service_cpu_usage(&self, service_name: &str) -> f64
async fn get_service_cpu_usage(&self, service_name: &str) -> f64
Get service CPU usage
Sourcepub async fn start_periodic_discovery(&self) -> Result<(), String>
pub async fn start_periodic_discovery(&self) -> Result<(), String>
Start periodic service discovery
Sourcepub async fn get_service_registry(&self) -> Result<ServiceRegistry, String>
pub async fn get_service_registry(&self) -> Result<ServiceRegistry, String>
Get service registry
Sourcepub async fn get_service_info(
&self,
service_name: &str,
) -> Result<Option<ServiceInfo>, String>
pub async fn get_service_info( &self, service_name: &str, ) -> Result<Option<ServiceInfo>, String>
Get service information
Sourcepub async fn attempt_recovery(&self) -> Result<(), String>
pub async fn attempt_recovery(&self) -> Result<(), String>
RECOVERY: Microsoft-inspired automatic recovery
Sourcepub fn get_performance_metrics(&self) -> Result<PerformanceMetrics, String>
pub fn get_performance_metrics(&self) -> Result<PerformanceMetrics, String>
Get performance metrics
Sourcepub fn get_health_status(&self) -> Result<HealthMonitor, String>
pub fn get_health_status(&self) -> Result<HealthMonitor, String>
Get health status
Sourcefn clone_reporter(&self) -> StatusReporter
fn clone_reporter(&self) -> StatusReporter
Clone the reporter for async tasks
Auto Trait Implementations§
impl Freeze for StatusReporter
impl !RefUnwindSafe for StatusReporter
impl Send for StatusReporter
impl Sync for StatusReporter
impl Unpin for StatusReporter
impl !UnwindSafe for StatusReporter
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].