pub struct DaemonConfig {Show 14 fields
pub listen: String,
pub domain: i32,
pub log_level: String,
pub topics: Vec<TopicConfig>,
pub tls_enabled: bool,
pub tls_cert_file: String,
pub tls_key_file: String,
pub tls_client_ca_file: String,
pub auth_mode: String,
pub auth_bearer_token: Option<String>,
pub auth_bearer_subject: Option<String>,
pub topic_acl: HashMap<String, (Vec<String>, Vec<String>)>,
pub metrics_enabled: bool,
pub metrics_addr: String,
}Expand description
Geparste Daemon-Config.
Fields§
§listen: Stringlisten: <addr> — Bind-Address.
domain: i32domain: <id> — DDS-Domain-ID.
log_level: Stringlog_level: <level>.
topics: Vec<TopicConfig>topics: Liste.
tls_enabled: booltls.enabled — wenn true, müssen tls_cert_file+tls_key_file
gesetzt sein. Spec §7.1.
tls_cert_file: Stringtls.cert_file — PEM-Cert-Pfad.
tls_key_file: Stringtls.key_file — PEM-Key-Pfad.
tls_client_ca_file: Stringtls.client_ca_file — PEM-CA-Bundle für mTLS Client-Auth.
auth_mode: Stringauth.mode — none|bearer|jwt|mtls|sasl. Spec §7.2.
auth_bearer_token: Option<String>auth.bearer_token — Single-Token-Form (Map mit einem Eintrag).
auth_bearer_subject: Option<String>auth.bearer_token_subject — wer hinter dem Bearer steckt.
topic_acl: HashMap<String, (Vec<String>, Vec<String>)>Topic-ACL: topic → ("read,write" CSV von Subjects). Spec §7.3.
metrics_enabled: boolmetrics.enabled — schaltet den Prometheus-Endpoint (§8.2).
metrics_addr: StringBind-Address fuer Admin-Endpoint (/metrics, /catalog,
/healthz). Wenn leer aber metrics_enabled=true: default
127.0.0.1:9090. Per CLI/metrics.address ueberschreibbar.
Implementations§
Source§impl DaemonConfig
impl DaemonConfig
Sourcepub fn default_for_dev() -> Self
pub fn default_for_dev() -> Self
Default-Config (wenn weder File noch CLI-Override gesetzt sind).
Sourcepub fn load_from_file(path: &Path) -> Result<Self, ConfigError>
pub fn load_from_file(path: &Path) -> Result<Self, ConfigError>
Laedt + parst eine Config aus File.
§Errors
Io bei Read-Fehler, Syntax/MissingField/BadValue bei
fehlerhaftem YAML.
Sourcepub fn load_from_str(raw: &str) -> Result<Self, ConfigError>
pub fn load_from_str(raw: &str) -> Result<Self, ConfigError>
Trait Implementations§
Source§impl Clone for DaemonConfig
impl Clone for DaemonConfig
Source§fn clone(&self) -> DaemonConfig
fn clone(&self) -> DaemonConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more