use std::path::PathBuf;
pub use crate::enums::{AppendFsync, EvictionPolicy, LogLevel, LogOutput};
pub use crate::notify::NotificationFlags;
pub use crate::sections::{MemorySection, PersistenceSection, ServerSection};
pub use crate::tuning::{
AdvancedSection, AuditSection, ExpirySection, LogSection, LuaSection, MetricsSection,
NotificationSection, SlowlogSection,
};
#[derive(Debug, Clone, PartialEq, Eq, Default, Hash)]
#[non_exhaustive]
pub struct Config {
pub server: ServerSection,
pub persistence: PersistenceSection,
pub memory: MemorySection,
pub metrics: MetricsSection,
pub audit: AuditSection,
pub expiry: ExpirySection,
pub log: LogSection,
pub notification: NotificationSection,
pub advanced: AdvancedSection,
pub slowlog: SlowlogSection,
pub cluster: crate::cluster::ClusterSection,
pub lua: LuaSection,
pub replication: crate::replication::ReplicationSection,
pub feed: FeedSection,
pub tiering: crate::tiering::TieringSection,
pub secure: crate::secure::SecureSection,
pub source_path: Option<PathBuf>,
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[non_exhaustive]
pub struct FeedSection {
pub enabled: bool,
pub feed_buffer_size: u64,
}
impl Default for FeedSection {
fn default() -> Self {
Self { enabled: false, feed_buffer_size: 64 * 1024 * 1024 }
}
}
pub use crate::error::ConfigError;