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