aboutsummaryrefslogtreecommitdiffstats
path: root/crates/rule-executor/src/cnfg.rs
blob: eac1c2d49e103725526357cf814bd63ac1da3567 (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
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 name: Arc<str>,
    pub subjects: Arc<[String]>,
    pub durable_name: Arc<str>,
    pub destination_prefix: Arc<str>,
    pub config: ConfigNats,
}

#[derive(Deserialize, Clone)]
pub struct ConfigNats {
    pub stream: Arc<str>,
    pub reload_subject: Arc<str>,
}