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:
- Read checkpoint
- Fetch changes from source
- Compute revs_diff against target
- Fetch missing docs from source
- Write to target
- Save checkpoint