pub struct CollectionManager { /* private fields */ }Expand description
Collection manager that coordinates data collection from multiple exchanges
Implementations§
Source§impl CollectionManager
impl CollectionManager
Sourcepub async fn new(config: MonitorConfig) -> Result<Self>
pub async fn new(config: MonitorConfig) -> Result<Self>
Create a new collection manager
Sourcepub async fn start_collection(
&self,
exchange_filter: Option<Vec<SmartString>>,
symbol_filter: Option<Vec<SmartString>>,
event_sender: Sender<MarketDataEvent>,
) -> Result<()>
pub async fn start_collection( &self, exchange_filter: Option<Vec<SmartString>>, symbol_filter: Option<Vec<SmartString>>, event_sender: Sender<MarketDataEvent>, ) -> Result<()>
Start data collection for specified exchanges and symbols
Sourcepub async fn get_active_tasks(&self) -> FxHashMap<String, CollectionTask>
pub async fn get_active_tasks(&self) -> FxHashMap<String, CollectionTask>
Get active tasks
Sourcepub async fn get_collection_status(
&self,
) -> FxHashMap<SmartString, Vec<CollectionStatus>>
pub async fn get_collection_status( &self, ) -> FxHashMap<SmartString, Vec<CollectionStatus>>
Get collection status for all exchanges
Sourcepub async fn stop_exchange(&self, exchange_name: &str) -> Result<()>
pub async fn stop_exchange(&self, exchange_name: &str) -> Result<()>
Stop collection for a specific exchange
Sourcepub async fn get_statistics(&self) -> FxHashMap<SmartString, u32>
pub async fn get_statistics(&self) -> FxHashMap<SmartString, u32>
Get statistics for all active collections
Sourcepub async fn health_check(&self) -> FxHashMap<SmartString, bool>
pub async fn health_check(&self) -> FxHashMap<SmartString, bool>
Perform health check on all registered exchanges
Returns a map of exchange names to their health status (true if connected and healthy, false otherwise)
Auto Trait Implementations§
impl Freeze for CollectionManager
impl !RefUnwindSafe for CollectionManager
impl Send for CollectionManager
impl Sync for CollectionManager
impl Unpin for CollectionManager
impl !UnwindSafe for CollectionManager
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