DynamicConfigService

Trait DynamicConfigService 

Source
pub trait DynamicConfigService: Service<Handle = Arc<Self>> {
    // Required method
    fn get_snapshot(
        &self,
    ) -> impl Future<Output = Result<BTreeMap<String, Value>, StdError>> + Send;

    // Provided method
    fn watch_changes(
        &self,
        updater: DynamicConfigUpdater,
        shutdown: CancellationToken,
    ) -> impl Future<Output = Result<(), StdError>> + Send { ... }
}
Expand description

Trait for dynamic configuration providers

Required Methods§

Source

fn get_snapshot( &self, ) -> impl Future<Output = Result<BTreeMap<String, Value>, StdError>> + Send

Get current snapshot of all configuration values

Provided Methods§

Source

fn watch_changes( &self, updater: DynamicConfigUpdater, shutdown: CancellationToken, ) -> impl Future<Output = Result<(), StdError>> + Send

Start watching for configuration changes

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§