Wrapper implementation for interface-datastore
$ npm i datastore-core
- Wrapper Implementations
- Mount:
src/mount
- Keytransform:
src/keytransform
- Sharding:
src/sharding
- Tiered:
src/tiered
- Namespace:
src/namespace
- Mount:
An base store is made available to make implementing your own datastore easier:
import { BaseDatastore } from 'datastore-core'
class MyDatastore extends BaseDatastore {
constructor () {
super()
}
async put (key, val) {
// your implementation here
}
async get (key) {
// your implementation here
}
// etc...
}
See the MemoryDatastore for an example of how it is used.
import { Key } from 'interface-datastore'
import {
MemoryStore,
MountStore
} from 'datastore-core'
const store = new MountStore({prefix: new Key('/a'), datastore: new MemoryStore()})
Feel free to join in. All welcome. Open an issue!
This repository falls under the IPFS Code of Conduct.
Licensed under either of
- Apache 2.0, (LICENSE-APACHE / http://www.apache.org/licenses/LICENSE-2.0)
- MIT (LICENSE-MIT / http://opensource.org/licenses/MIT)
Feel free to join in. All welcome. Open an issue!
This repository falls under the IPFS Code of Conduct.