tembo_stacks/stacks/
mod.rs1pub mod config_engines;
2pub mod types;
3
4use crate::stacks::types::{Stack, StackType};
5
6use lazy_static::lazy_static;
7
8lazy_static! {
9 pub static ref ANALYTICS: Stack = serde_yaml::from_str(include_str!("specs/analytics.yaml"))
10 .expect("analytics.yaml not found");
11 pub static ref GEOSPATIAL: Stack =
12 serde_yaml::from_str(include_str!("specs/gis.yaml")).expect("gis.yaml not found");
13 pub static ref ML: Stack = serde_yaml::from_str(include_str!("specs/machine_learning.yaml"))
14 .expect("machine_learning.yaml not found");
15 pub static ref MONGO_ALTERNATIVE: Stack =
16 serde_yaml::from_str(include_str!("specs/mongo_alternative.yaml"))
17 .expect("mongo_alternative.yaml not found");
18 pub static ref MQ: Stack = serde_yaml::from_str(include_str!("specs/message_queue.yaml"))
19 .expect("message_queue.yaml not found");
20 pub static ref OLTP: Stack =
21 serde_yaml::from_str(include_str!("specs/oltp.yaml")).expect("oltp.yaml not found");
22 pub static ref PARADEDB: Stack =
23 serde_yaml::from_str(include_str!("specs/paradedb.yaml")).expect("paradedb.yaml not found");
24 pub static ref STANDARD: Stack =
25 serde_yaml::from_str(include_str!("specs/standard.yaml")).expect("standard.yaml not found");
26 pub static ref TIMESERIES: Stack = serde_yaml::from_str(include_str!("specs/timeseries.yaml"))
27 .expect("timeseries.yaml not found");
28 pub static ref VECTOR_DB: Stack =
29 serde_yaml::from_str(include_str!("specs/vectordb.yaml")).expect("vectordb.yaml not found");
30}
31
32pub fn get_stack(entity: StackType) -> Stack {
33 match entity {
34 StackType::Analytics => ANALYTICS.clone(),
35 StackType::Geospatial => GEOSPATIAL.clone(),
36 StackType::MachineLearning => ML.clone(),
37 StackType::MessageQueue => MQ.clone(),
38 StackType::MongoAlternative => MONGO_ALTERNATIVE.clone(),
39 StackType::OLTP => OLTP.clone(),
40 StackType::ParadeDB => PARADEDB.clone(),
41 StackType::Standard => STANDARD.clone(),
42 StackType::Timeseries => TIMESERIES.clone(),
43 StackType::VectorDB => VECTOR_DB.clone(),
44 }
45}