MCPcopy Index your code
hub / github.com/apache/pouchdb / initCheckpointer

Function initCheckpointer

lib/index.js:9805–9825  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9803 returnValue.ready(src, target);
9804
9805 function initCheckpointer() {
9806 if (checkpointer) {
9807 return Promise.resolve();
9808 }
9809 return generateReplicationId(src, target, opts).then(function (res$$1) {
9810 repId = res$$1;
9811
9812 var checkpointOpts = {};
9813 if (opts.checkpoint === false) {
9814 checkpointOpts = { writeSourceCheckpoint: false, writeTargetCheckpoint: false };
9815 } else if (opts.checkpoint === 'source') {
9816 checkpointOpts = { writeSourceCheckpoint: true, writeTargetCheckpoint: false };
9817 } else if (opts.checkpoint === 'target') {
9818 checkpointOpts = { writeSourceCheckpoint: false, writeTargetCheckpoint: true };
9819 } else {
9820 checkpointOpts = { writeSourceCheckpoint: true, writeTargetCheckpoint: true };
9821 }
9822
9823 checkpointer = new Checkpointer(src, target, repId, returnValue, checkpointOpts);
9824 });
9825 }
9826
9827 function writeDocs() {
9828 changedDocs = [];

Callers 2

startChangesFunction · 0.70
replicateFunction · 0.70

Calls 1

generateReplicationIdFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…