diff --git a/src/drive/drive_monitor/mod.rs b/src/drive/drive_monitor/mod.rs index 0e90eacb..1cc202ad 100644 --- a/src/drive/drive_monitor/mod.rs +++ b/src/drive/drive_monitor/mod.rs @@ -3,4 +3,4 @@ mod kb_processor; mod monitor; mod utils; -pub use types::{DriveMonitor, normalize_etag}; +pub use types::{DriveMonitor, normalize_etag, normalize_config_value}; diff --git a/src/drive/drive_monitor/types.rs b/src/drive/drive_monitor/types.rs index 32ba003f..8f9f5ab0 100644 --- a/src/drive/drive_monitor/types.rs +++ b/src/drive/drive_monitor/types.rs @@ -35,6 +35,26 @@ pub fn normalize_etag(etag: &str) -> String { etag.trim_matches('"').to_string() } +pub fn normalize_config_value(value: &str) -> String { + let trimmed = value.trim(); + if trimmed.is_empty() || trimmed.eq_ignore_ascii_case("none") { + String::new() + } else { + trimmed.to_string() + } +} + +impl DriveMonitor { + /// Start monitoring the drive bucket for changes + /// This is a placeholder that will be implemented with the actual monitoring logic + pub async fn start_monitoring(&self) -> Result<(), Box> { + log::info!("DriveMonitor monitoring started for bucket: {}", self.bucket_name); + // The actual monitoring logic is handled by LocalFileMonitor + // This method is kept for backward compatibility + Ok(()) + } +} + #[derive(Debug, Clone)] pub struct DriveMonitor { pub state: Arc, diff --git a/src/drive/drive_monitor/utils.rs b/src/drive/drive_monitor/utils.rs index 1774031c..70ea423b 100644 --- a/src/drive/drive_monitor/utils.rs +++ b/src/drive/drive_monitor/utils.rs @@ -1,12 +1,4 @@ -use super::types::DriveMonitor; - -impl DriveMonitor { - pub fn normalize_config_value(value: &str) -> String { - let trimmed = value.trim(); - if trimmed.is_empty() || trimmed.eq_ignore_ascii_case("none") { - String::new() - } else { - trimmed.to_string() - } - } -} +// Utility functions for drive_monitor module +// Re-exports from types.rs to maintain module structure +// Re-exported from types.rs for module structure +// pub use super::types::normalize_config_value;