mod prima;
mod test;
pub use prima::{Country, Environment, PrimaConfiguration};
pub use test::TestConfiguration;
use crate::TagTrackerConfiguration;
#[allow(clippy::wrong_self_convention)]
pub trait Configuration {
fn to_addr(&self) -> &str;
fn from_addr(&self) -> &str;
fn namespace(&self) -> &str;
fn is_reporting_enabled(&self) -> bool;
fn default_tags(&self) -> Vec<String>;
fn take_tracker_config(&mut self) -> TagTrackerConfiguration {
TagTrackerConfiguration::new()
}
}
impl Configuration for dogstatsd::Options {
fn to_addr(&self) -> &str {
self.to_addr.as_str()
}
fn from_addr(&self) -> &str {
self.from_addr.as_str()
}
fn namespace(&self) -> &str {
self.namespace.as_str()
}
fn is_reporting_enabled(&self) -> bool {
true
}
fn default_tags(&self) -> Vec<String> {
vec![]
}
}