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.
15 lines
517 B
15 lines
517 B
pub mod pattern_analytic_unit; |
|
pub mod threshold_analytic_unit; |
|
pub mod types; |
|
|
|
use self::{ |
|
pattern_analytic_unit::PatternAnalyticUnit, threshold_analytic_unit::ThresholdAnalyticUnit, |
|
types::AnalyticUnitConfig, |
|
}; |
|
|
|
pub fn resolve(cfg: AnalyticUnitConfig) -> Box<dyn types::AnalyticUnit + Send + Sync> { |
|
match cfg { |
|
AnalyticUnitConfig::Pattern(c) => Box::new(PatternAnalyticUnit::new(c.clone())), |
|
AnalyticUnitConfig::Threshold(c) => Box::new(ThresholdAnalyticUnit::new(c.clone())), |
|
} |
|
}
|
|
|