mafintosh / todo

I add my TODOs as issues in this repository.
3 stars 0 forks source link

hypercore storage api #2

Closed mafintosh closed 8 years ago

mafintosh commented 8 years ago

this is what i ended up with.

var store = Storage(feed) // will be be passed in by hypercore
store.append(chunks) // append to a feed if possible
store.get(index, cb) // get a chunk
store.put(index, chunk, cb) // put a chunk
store.close(cb) // will be called when the store is discarded

this is almost a chunk-store except it uses variable sized chunks.

mafintosh commented 8 years ago

after validating this api with hypercore i'm gonna document it and add it to the public api

okdistribute commented 8 years ago

nice