aboutsummaryrefslogtreecommitdiffstats
path: root/crates/typologies/src/cnfg.rs
blob: 6086f466bd8b4635395dbc0eb7b7a4c1addb284e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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>,
}