Save CouchDB sequence #s to a configurable backend. This allows you to resume CouchDB replication from the point where you left off.
see also: changes-stream.
This is a replacement to
support for additional backends.
pathis the path on disk to save the file to or the key to use for an alternative backend, such as etcd. Returns a new sequence saving instance.
sequence): save the
sequenceto the configured backend. Returns a Promise which will resolve once the value is saved.
<Promise>save.read(): Returns a Promise that will resolve with the current sequence #.
To save sequence files to the filesystem, simply provide the following configuration:
const SeqSave =const seq = 'my-sequence.seq'type: 'file'
It's worth noting that
file is the default backend, so you can also
simply provide an empty configuration object..
To save sequence files to etcd, simply provide the following configuration:
const Save =const seq = 'my-sequence.seq'type: 'etcd'host: ''