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

Function initCheckpointer

lib/index-browser.js:9771–9791  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9769 returnValue.ready(src, target);
9770
9771 function initCheckpointer() {
9772 if (checkpointer) {
9773 return Promise.resolve();
9774 }
9775 return generateReplicationId(src, target, opts).then(function (res) {
9776 repId = res;
9777
9778 var checkpointOpts = {};
9779 if (opts.checkpoint === false) {
9780 checkpointOpts = { writeSourceCheckpoint: false, writeTargetCheckpoint: false };
9781 } else if (opts.checkpoint === 'source') {
9782 checkpointOpts = { writeSourceCheckpoint: true, writeTargetCheckpoint: false };
9783 } else if (opts.checkpoint === 'target') {
9784 checkpointOpts = { writeSourceCheckpoint: false, writeTargetCheckpoint: true };
9785 } else {
9786 checkpointOpts = { writeSourceCheckpoint: true, writeTargetCheckpoint: true };
9787 }
9788
9789 checkpointer = new Checkpointer(src, target, repId, returnValue, checkpointOpts);
9790 });
9791 }
9792
9793 function writeDocs() {
9794 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…