* init rustfs config * init rustfs-utils crate * improve code for rustfs-config crate * add * improve code for comment * init rustfs config * improve code for rustfs-config crate * add * improve code for comment * Unified management of configurations and constants * fix: modify rustfs-config crate name * add default fn * improve code for rustfs config * refactor: standardize constant management and fix typos - Create centralized constants module for global static constants - Replace runtime format! expressions with compile-time constants - Fix DEFAULT_PORT reference issues in configuration arguments - Use const-str crate for compile-time string concatenation - Update tokio dependency from 1.42.2 to 1.45.0 - Ensure consistent naming convention for configuration constants * fix * Update common/workers/src/workers.rs Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
23 lines
566 B
Rust
23 lines
566 B
Rust
use crate::observability::logger::LoggerConfig;
|
|
use crate::observability::otel::OtelConfig;
|
|
use crate::observability::sink::SinkConfig;
|
|
use serde::Deserialize;
|
|
|
|
/// Observability configuration
|
|
#[derive(Debug, Deserialize, Clone)]
|
|
pub struct ObservabilityConfig {
|
|
pub otel: OtelConfig,
|
|
pub sinks: SinkConfig,
|
|
pub logger: Option<LoggerConfig>,
|
|
}
|
|
|
|
impl ObservabilityConfig {
|
|
pub fn new() -> Self {
|
|
Self {
|
|
otel: OtelConfig::new(),
|
|
sinks: SinkConfig::new(),
|
|
logger: Some(LoggerConfig::new()),
|
|
}
|
|
}
|
|
}
|