deferred-chunk-store
expose a child store interface to delay providing an implementation
This module is similar in spirit to deferred-leveldown
example
var defstore =var fdstore =var mkdirp =var store =store
api
var deferredStore =
var store = deferredStore(chunkSize)
Present a chunk store interface store
with chunkSize
.
store.setStore(otherStore)
Set the underlying implementation to otherStore
, sending buffered and future
operations in order.
store.put(n, buf, opts={}, cb)
Write a buffer buf
at chunk index n
.
store.get(n, opts={}, cb)
Read a buffer at chunk index n
as cb(err, buf)
.
store.destroy()
Destroy the underlying resource.
store.close()
Close the underlying resource.
license
BSD