mirror of
https://github.com/v0l/zap-stream-core.git
synced 2025-06-22 06:22:50 +00:00
refactor: convert to workspace
This commit is contained in:
19
crates/zap-stream/src/monitor.rs
Normal file
19
crates/zap-stream/src/monitor.rs
Normal file
@ -0,0 +1,19 @@
|
||||
use crate::overseer::ZapStreamOverseer;
|
||||
use anyhow::Result;
|
||||
use std::sync::Arc;
|
||||
use zap_stream_core::overseer::Overseer;
|
||||
|
||||
/// Monitor stream status, perform any necessary cleanup
|
||||
pub struct BackgroundMonitor {
|
||||
overseer: Arc<ZapStreamOverseer>,
|
||||
}
|
||||
|
||||
impl BackgroundMonitor {
|
||||
pub fn new(overseer: Arc<ZapStreamOverseer>) -> Self {
|
||||
Self { overseer }
|
||||
}
|
||||
|
||||
pub async fn check(&mut self) -> Result<()> {
|
||||
self.overseer.check_streams().await
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user