1.0.0 • Published 1 year ago

@micromint1npm/porro-nulla-natus v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

seq-save

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 seq-file, adding support for additional backends.

API

  • SeqSave(path, opts): where path is 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.
  • <Promise> save.save(sequence): save the sequence to 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 #.

Backends

File (Default)

To save sequence files to the filesystem, simply provide the following configuration:

const SeqSave = require('seq-save')
const seq = new SeqSave('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..

etcd

To save sequence files to etcd, simply provide the following configuration:

NOTE: if you specify a path in the etcd backend that begins with a leading dot character ., it will be removed.

const Save = require('seq-save')
const seq = new SeqSave('my-sequence.seq', {
  type: 'etcd',
  host: 'http://127.0.0.1:2379'
})
zerowatchFileviewassertiondeep-copybluebirdkeyregular expressionprettyWebSocketstylesdataworkertypanionjsnumbermomentequalityObject.valuessymbolsttynpmfigletelm@@toStringTagpolyfillObjectES2021performancecensorjestuplinkURLreal-timeoptimizerwatchersqsTypeScriptintrinsicendpointcloudsearchdeepcopyreactieratelimitObject.entriescompareinhookformclassnamesroutemapreusepipeserializeES2022idregexpenvES5call-boundbatchformattingdrophelpersjoirangeerrorworkflowmake-0ES2023fixed-widthRFC-6455xtermes2015importonceseswritepackage.jsonquerysetglobstdlibES2017superstructoutputpreserve-symlinksserializationtoArrayapiagentbusyflatMaptrimEndhttpECMAScript 2016gradients css3typeerrores7parserpropcollection.es6safeECMAScript 7mapreduceSymbolrfc4122cachefunctionshttpses8ReactiveXES2019ECMAScript 6regularjsdiffJSON-SchemareadablestreamgroupBypreprocessorstringifyurlbannerinternal slotreplaypositivekeys0look-upprivates3deepclonefilepersistenthasOwnPropertyexpresspushInt8Arraynested cssmatchesRegExp.prototype.flagsfetchsetterObject.definePropertythroatiteratetakeObservabletapfrommatchAllassignwhatwgInt32Arraycjkeast-asian-widthimportexportpathcoreArrayBuffer.prototype.slicedeleteelbstyleformatconcurrencyUint8ArraypasswordcommandcolorsES2016jwtwatchjsonpathsameValueZerotoobjectdirectoryrecursivesuperagenttelephoneflagschemaswfES6mimees-abstractajaxinspecttslibuninstallarktypesyntaxerrorlengthwatchingfluxdescriptorsquerystringwritableHyBisettingsreadablehotflattenisjasminecurlclassesbeanstalkcode pointsmime-dbECMAScript 2022iterationdommimetypesECMAScript 5bootstrap csspatchCSSArrayBufferreadratecommand-linenegative zeroimmutableJSONresolvetypedarraystreamextensiondynamodbqswarning__proto__ajveventDispatcherhas-ownbundlerfind-uptrimLeftes-shim APIless.jspromiseObject.keysformECMAScript 2017typedcloudtrailreact-hook-formfast-copycodesfast-deep-copytddargparsetostringtagtypescriptartnegativenodeboundconcatMaplivel10nFunction.prototype.namevpcpluginjsonframeworkcore-jsUint16ArrayObject.assigncss variablelastwalkingfindstreams2regexcloudwatchnamescomputed-typesvisualgetcss-in-jsString.prototype.matchAllPromisermdirArrayfullautoprefixervariables in cssgetterutil.inspectlogtoolkitlimitreducegetOwnPropertyDescriptor$.extendwalkstartercolumnsarraycloudformationbundlingsymlinkrgbrequestfpscopynameshamObject.fromEntriescallbackwaitawsthrottlesequencedataviewbrowseransitextworkspace:*shrinkwrapfindLastlanguageprotocol-buffersreduxquoteeslintconfigArray.prototype.includespropertygenericsWeakSettoStringTagtaskstoragegatewayes2017fast-cloneflatperformantconfigurableauthESnextairbnbestreespecpostcss-pluginreact-testing-librarylesscssAsyncIteratorsetImmediatesymbolcall-bindBigUint64ArraymatchtermawaitmkdirsTypedArray
1.0.0

1 year ago