aboutsummaryrefslogtreecommitdiffstats
path: root/crates/typologies/src/cnfg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typologies/src/cnfg.rs')
-rw-r--r--crates/typologies/src/cnfg.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/crates/typologies/src/cnfg.rs b/crates/typologies/src/cnfg.rs
new file mode 100644
index 0000000..6086f46
--- /dev/null
+++ b/crates/typologies/src/cnfg.rs
@@ -0,0 +1,27 @@
+use std::sync::Arc;
+
+use serde::Deserialize;
+
+#[derive(Deserialize, Clone)]
+#[serde(rename_all = "kebab-case")]
+pub struct LocalConfig {
+ pub config_endpoint: Arc<str>,
+ pub nats: Nats,
+}
+
+#[derive(Deserialize, Clone)]
+#[serde(rename_all = "kebab-case")]
+pub struct Nats {
+ pub subjects: Arc<[String]>,
+ pub destination_prefix: Arc<str>,
+ pub max_messages: i64,
+ pub durable_name: Arc<str>,
+ pub config: ConfigNats,
+}
+
+#[derive(Deserialize, Clone)]
+#[serde(rename_all = "kebab-case")]
+pub struct ConfigNats {
+ pub stream: Arc<str>,
+ pub reload_subject: Arc<str>,
+}