Hastic standalone
https://hastic.io
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
776 B
33 lines
776 B
use crate::services::analytic_service::analytic_unit::types::AnalyticUnit; |
|
|
|
use std::sync::Arc; |
|
|
|
|
|
use chrono::Utc; |
|
|
|
use tokio::sync::{mpsc, RwLock}; |
|
|
|
use super::types::DetectionRunnerConfig; |
|
|
|
pub struct DetectionRunner { |
|
config: DetectionRunnerConfig, |
|
analytic_unit: Arc<RwLock<Box<dyn AnalyticUnit + Send + Sync>>>, |
|
} |
|
|
|
impl DetectionRunner { |
|
pub fn new( |
|
config: DetectionRunnerConfig, |
|
analytic_unit: Arc<RwLock<Box<dyn AnalyticUnit + Send + Sync>>>, |
|
) -> DetectionRunner { |
|
DetectionRunner { |
|
config, |
|
analytic_unit, |
|
} |
|
} |
|
|
|
pub async fn run() { |
|
// TODO: await detection step |
|
// TODO: get last detection timestamp from persistance |
|
// TODO: set lst detection from "now" |
|
} |
|
}
|
|
|