kappa-core
Advanced tools
Comparing version 1.2.1 to 1.3.0
@@ -21,3 +21,5 @@ var hypercore = require('hypercore') | ||
maxBatch: 10, | ||
batch: view.map | ||
batch: view.map, | ||
fetchState: view.fetchState, | ||
storeState: view.storeState | ||
}) | ||
@@ -24,0 +26,0 @@ this._indexes[name] = idx |
@@ -5,3 +5,3 @@ { | ||
"author": "Stephen Whitmore <sww@eight.net>", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "url": "git://github.com/noffle/kappa-core.git" |
@@ -93,3 +93,6 @@ # kappa-core | ||
next() | ||
} | ||
}, | ||
fetchState: function (cb) { ... }, | ||
storeState: function (state, cb) { ... } | ||
} | ||
@@ -101,2 +104,8 @@ ``` | ||
The `{fetch,store}State` functions are optional: they tell the view where to | ||
store its state information about what log entries have been indexed thus far. | ||
If not passed in, they will be stored in memory (i.e. reprocessed on each fresh | ||
run of the program). You can use any backend you want (like leveldb) to store | ||
the `Buffer` object `state`. | ||
### core.replicate([opts]) | ||
@@ -103,0 +112,0 @@ |
10727
60
171