Skip to main content

run_config_reload_worker

Function run_config_reload_worker 

Source
pub async fn run_config_reload_worker<N, F, Fut>(
    notifier: Arc<N>,
    config: ConfigReloadWorkerConfig,
    shutdown: CancellationToken,
    reload: F,
) -> Result<()>
where N: ConfigChangeNotifier + ?Sized, F: FnMut(ConfigReloadMessage) -> Fut, Fut: Future<Output = Result<()>>,
Expand description

Runs a reload subscription loop until shutdown is cancelled.

The loop never carries configuration values over pub/sub. A matching notification only tells this process to reload from its authoritative store. Reload errors are logged and the loop keeps listening, because one failed DB read should not permanently break cross-process synchronization.

The loop is supervised like run_config_reload_supervisor with a no-op reconcile: subscription failures, stream endings, and broadcast lag trigger a bounded reconnect instead of exiting.