Skip to main content

replicate

Function replicate 

Source
pub async fn replicate(
    source: &dyn Adapter,
    target: &dyn Adapter,
    opts: ReplicationOptions,
) -> Result<ReplicationResult>
Expand description

Run a one-shot replication from source to target.

Implements the CouchDB replication protocol:

  1. Read checkpoint
  2. Fetch changes from source
  3. Compute revs_diff against target
  4. Fetch missing docs from source
  5. Write to target
  6. Save checkpoint