use std::time::Duration;
#[derive(Debug, Clone)]
pub struct Config {
pub api_url: String,
pub refresh_interval: Duration,
pub initial_view: String,
#[allow(dead_code)]
pub debug: bool,
pub version: String,
}
impl Default for Config {
fn default() -> Self {
Self {
api_url: "http://localhost:3000".to_string(),
refresh_interval: Duration::from_secs(2),
initial_view: "logs".to_string(),
debug: false,
version: concat!(
env!("CARGO_PKG_VERSION"),
" (",
env!("OTELITE_GIT_SHA"),
")"
)
.to_string(),
}
}
}