Skip to main content

run_central_kv_sync

Function run_central_kv_sync 

Source
pub(crate) async fn run_central_kv_sync(
    sync_cfg: CentralKvSyncConfig,
    local_store: Store,
    local_key: String,
)
Expand description

Continuously mirrors central KV updates into the local configuration bucket.

This task reconnects after setup or watch failures and only writes updates that parse as a valid dashboard configuration. Each retry waits 5 seconds. Delete and purge events are logged and ignored, and a value equal to the local one is not rewritten. The function never returns; main runs it with tokio::spawn.

ยงArguments

  • sync_cfg - Central server, credentials, bucket and key.
  • local_store - Local KV bucket to write into.
  • local_key - Local key to write.