diff --git a/pdns/dnsdistdist/dnsdist-configuration-yaml.cc b/pdns/dnsdistdist/dnsdist-configuration-yaml.cc index 92098cf512ef..fb0c5d4bf931 100644 --- a/pdns/dnsdistdist/dnsdist-configuration-yaml.cc +++ b/pdns/dnsdistdist/dnsdist-configuration-yaml.cc @@ -22,13 +22,13 @@ #include "dnsdist-configuration-yaml.hh" #include "iputils.hh" +#include "remote_logger.hh" #if defined(HAVE_YAML_CONFIGURATION) -#include - #include "dolog.hh" #include "dnsdist-rules.hh" +#include "dnsdist-kvs.hh" #include "rust/cxx.h" #include "rust/lib.rs.h" #endif /* HAVE_YAML_CONFIGURATION */ @@ -74,7 +74,7 @@ bool loadConfigurationFromFile(const std::string fileName) namespace dnsdist::rust::settings { -using RegisteredTypes = std::variant, std::shared_ptr>; +using RegisteredTypes = std::variant, std::shared_ptr, std::shared_ptr, std::shared_ptr, std::shared_ptr>; static LockGuarded> s_registeredTypesMap; template static void registerType(const std::shared_ptr& entry, std::string& name) diff --git a/pdns/dnsdistdist/dnsdist-rust-lib/rust/src/lib.rs b/pdns/dnsdistdist/dnsdist-rust-lib/rust/src/lib.rs index 1311f3e557be..36e724afdf15 100644 --- a/pdns/dnsdistdist/dnsdist-rust-lib/rust/src/lib.rs +++ b/pdns/dnsdistdist/dnsdist-rust-lib/rust/src/lib.rs @@ -65,6 +65,57 @@ mod dnsdistsettings { carbon: Vec, } + #[derive(Default, Deserialize, Serialize, Debug, PartialEq)] + #[serde(deny_unknown_fields)] + struct ProtobufLoggerConfig { + #[serde(default, skip_serializing_if = "crate::is_default")] + address: String, + #[serde(default, skip_serializing_if = "crate::is_default")] + name: String, + #[serde(default, skip_serializing_if = "crate::is_default")] + timeout: u16, + #[serde( + default, + rename = "max-queued-entries", + skip_serializing_if = "crate::is_default" + )] + max_queued_entries: u64, + #[serde( + default, + rename = "reconnect-wait-time", + skip_serializing_if = "crate::is_default" + )] + reconnect_wait_time: u8, + } + + #[derive(Default, Deserialize, Serialize, Debug, PartialEq)] + #[serde(deny_unknown_fields)] + struct FrameStreamLoggerConfig { + #[serde(default, skip_serializing_if = "crate::is_default")] + address: String, + #[serde(default, skip_serializing_if = "crate::is_default")] + name: String, + #[serde(default, skip_serializing_if = "crate::is_default")] + protocol: String, + } + + #[derive(Default, Deserialize, Serialize, Debug, PartialEq)] + #[serde(deny_unknown_fields)] + struct RemoteLoggingConfiguration { + #[serde( + default, + rename = "protocol-buffer", + skip_serializing_if = "crate::is_default" + )] + protocol_buffer: Vec, + #[serde( + default, + rename = "frame-stream", + skip_serializing_if = "crate::is_default" + )] + frame_stream: Vec, + } + #[derive(Default, Deserialize, Serialize, Debug, PartialEq)] #[serde(deny_unknown_fields)] struct MaxQPSIPRuleConfig { @@ -138,6 +189,7 @@ mod dnsdistsettings { metrics: MetricsConfiguration, webserver: WebServerConfiguration, console: ConsoleConfiguration, + remote_logging: RemoteLoggingConfiguration, realselectors: Vec, } @@ -201,6 +253,8 @@ struct GlobalConfigurationSerde { #[serde(default, skip_serializing_if = "crate::is_default")] console: dnsdistsettings::ConsoleConfiguration, #[serde(default, skip_serializing_if = "crate::is_default")] + remote_logging: dnsdistsettings::RemoteLoggingConfiguration, + #[serde(default, skip_serializing_if = "crate::is_default")] testselectors: Vec, }