pub struct TieredConfigManager { /* private fields */ }
Expand description
Main tiered configuration manager
Implementations§
Source§impl TieredConfigManager
impl TieredConfigManager
Sourcepub fn add_store(
&mut self,
tier: ConfigurationTier,
store: Box<dyn ConfigStore>,
)
pub fn add_store( &mut self, tier: ConfigurationTier, store: Box<dyn ConfigStore>, )
Adds a configuration store for a specific tier
Sourcepub async fn get<T>(&self, key: &str) -> Result<Option<T>>where
T: for<'de> Deserialize<'de>,
pub async fn get<T>(&self, key: &str) -> Result<Option<T>>where
T: for<'de> Deserialize<'de>,
Gets a configuration value by merging across all tiers
Sourcepub async fn set(
&mut self,
key: &str,
value: Value,
tier: ConfigurationTier,
) -> Result<()>
pub async fn set( &mut self, key: &str, value: Value, tier: ConfigurationTier, ) -> Result<()>
Sets a configuration value in a specific tier
Sourcepub async fn delete(&self, key: &str, tier: ConfigurationTier) -> Result<()>
pub async fn delete(&self, key: &str, tier: ConfigurationTier) -> Result<()>
Deletes a configuration value from a specific tier
Sourcepub async fn list_keys(&self, prefix: &str) -> Result<Vec<String>>
pub async fn list_keys(&self, prefix: &str) -> Result<Vec<String>>
Lists all keys with a given prefix
Sourcepub fn subscribe_to_changes(&self) -> Receiver<ConfigChangeEvent>
pub fn subscribe_to_changes(&self) -> Receiver<ConfigChangeEvent>
Subscribes to configuration changes
Sourcepub fn add_validation_rule(&mut self, key: String, rule: ValidationRule)
pub fn add_validation_rule(&mut self, key: String, rule: ValidationRule)
Adds a validation rule
Sourcepub async fn validate_all(&self) -> Result<Vec<ValidationError>>
pub async fn validate_all(&self) -> Result<Vec<ValidationError>>
Validates all configuration values
Sourcepub async fn clear_cache(&self)
pub async fn clear_cache(&self)
Clears the configuration cache
Trait Implementations§
Source§impl Debug for TieredConfigManager
impl Debug for TieredConfigManager
Source§impl Default for TieredConfigManager
impl Default for TieredConfigManager
Source§impl Manager for TieredConfigManager
Conditional Manager implementation for TieredConfigManager
impl Manager for TieredConfigManager
Conditional Manager implementation for TieredConfigManager
Source§fn initialize<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initializes the manager
Source§fn shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shuts down the manager
Source§fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ManagerStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ManagerStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns current status
Source§fn supports_runtime_reload(&self) -> bool
fn supports_runtime_reload(&self) -> bool
Checks if manager supports runtime reloading
Source§fn reload_config<'life0, 'async_trait>(
&'life0 mut self,
config: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reload_config<'life0, 'async_trait>(
&'life0 mut self,
config: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reloads configuration at runtime
Source§fn platform_requirements(&self) -> PlatformRequirements
fn platform_requirements(&self) -> PlatformRequirements
Returns platform requirements
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Performs health check
Source§fn pause<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn pause<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Pauses the manager
Source§fn resume<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn resume<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Resumes the manager
Source§fn restart<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn restart<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Restarts the manager
Source§fn get_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<Value>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn get_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<Value>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Gets current configuration
Source§fn update_config<'life0, 'async_trait>(
&'life0 mut self,
_config: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn update_config<'life0, 'async_trait>(
&'life0 mut self,
_config: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Updates configuration
Source§fn dependencies(&self) -> Vec<String>
fn dependencies(&self) -> Vec<String>
Returns dependencies
Source§fn is_essential(&self) -> bool
fn is_essential(&self) -> bool
Checks if manager is essential for system operation
Source§fn description(&self) -> Option<String>
fn description(&self) -> Option<String>
Returns manager description
Source§fn required_permissions(&self) -> Vec<String>
fn required_permissions(&self) -> Vec<String>
Returns required permissions
Auto Trait Implementations§
impl !Freeze for TieredConfigManager
impl !RefUnwindSafe for TieredConfigManager
impl Send for TieredConfigManager
impl Sync for TieredConfigManager
impl Unpin for TieredConfigManager
impl !UnwindSafe for TieredConfigManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.