Mountain/IPC/StatusReporter/
mountain_start_service_discovery.rs1#![allow(non_snake_case)]
2
3use tauri::Manager;
8
9use crate::{IPC::StatusReporter::Reporter::Struct as Reporter, dev_log};
10
11#[tauri::command]
12pub async fn mountain_start_service_discovery(app_handle:tauri::AppHandle) -> Result<(), String> {
13 dev_log!("lifecycle", "Tauri command: start_service_discovery");
14
15 if let Some(reporter) = app_handle.try_state::<Reporter>() {
16 reporter.start_periodic_discovery().await
17 } else {
18 Err("StatusReporter not found in application state".to_string())
19 }
20}