2019-08-29 14:46:54 -07:00
|
|
|
//! Zebrad Config
|
|
|
|
//!
|
|
|
|
//! See instructions in `commands.rs` to specify the path to your
|
|
|
|
//! application's configuration file and/or command-line options
|
|
|
|
//! for specifying it.
|
|
|
|
|
|
|
|
use abscissa_core::Config;
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
2019-10-08 13:57:24 -07:00
|
|
|
use zebra_network::Config as NetworkSection;
|
|
|
|
|
2019-08-29 14:46:54 -07:00
|
|
|
/// Zebrad Configuration
|
2019-10-08 13:57:24 -07:00
|
|
|
#[derive(Clone, Config, Default, Debug, Deserialize, Serialize)]
|
2019-08-29 14:46:54 -07:00
|
|
|
#[serde(deny_unknown_fields)]
|
|
|
|
pub struct ZebradConfig {
|
2019-09-09 13:05:42 -07:00
|
|
|
/// Tracing configuration
|
|
|
|
pub tracing: TracingSection,
|
2019-10-08 13:57:24 -07:00
|
|
|
/// Networking configuration,
|
|
|
|
pub network: NetworkSection,
|
2019-08-29 14:46:54 -07:00
|
|
|
}
|
|
|
|
|
2019-09-09 13:05:42 -07:00
|
|
|
/// Tracing configuration section.
|
2019-08-29 14:46:54 -07:00
|
|
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
|
|
|
#[serde(deny_unknown_fields)]
|
2019-09-09 13:05:42 -07:00
|
|
|
pub struct TracingSection {
|
|
|
|
/// The filter used for tracing events.
|
|
|
|
pub filter: String,
|
2019-08-29 14:46:54 -07:00
|
|
|
}
|
|
|
|
|
2019-09-09 13:05:42 -07:00
|
|
|
impl Default for TracingSection {
|
2019-08-29 14:46:54 -07:00
|
|
|
fn default() -> Self {
|
|
|
|
Self {
|
2019-09-09 13:05:42 -07:00
|
|
|
filter: "info".to_owned(),
|
2019-08-29 14:46:54 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|