somatize_runtime/runner/
mod.rs1pub mod local;
8
9use somatize_compiler::ExecutionPlan;
10use somatize_core::cache::CacheStore;
11use somatize_core::error::Result;
12use somatize_core::value::Value;
13use std::collections::HashMap;
14
15use crate::EventBus;
16use crate::filter_library::FilterLibrary;
17use std::sync::Arc;
18
19pub trait Runner: Send + Sync {
22 fn fit(
25 &self,
26 plan: &ExecutionPlan,
27 filters: &FilterLibrary,
28 cache: &dyn CacheStore,
29 event_bus: &Arc<EventBus>,
30 input: &Value,
31 y: Option<&Value>,
32 ) -> Result<(Value, HashMap<String, Value>)>;
33
34 fn forward(
36 &self,
37 plan: &ExecutionPlan,
38 filters: &FilterLibrary,
39 cache: &dyn CacheStore,
40 event_bus: &Arc<EventBus>,
41 input: &Value,
42 ) -> Result<Value>;
43}
44
45pub use local::LocalRunner;