Level / community

Discussion, support and common information for projects in the community.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I read a stream of operations?

christianbundy opened this issue · comments

Apologies if this is in the wrong repo.

I'd like to be able to subscribe to a stream of operations on a levelup instance -- is that something that I can do, or is that something that would have to be supported by a given store? For example, I'd like to receive a list of all of the put or del operations, especially if I'm able to see the list of past operations.

Thanks!

For example, I'd like to receive a list of all of the put or del operations

That's possible. There are modules for "live streams" (using events emitted by levelup). Have a look at the Streams section of Level/awesome, as well as Hooks for lower-level utils, and perhaps Benchmarking & Debugging.

especially if I'm able to see the list of past operations.

You can get past data, I don't know about past operations. You would have to store that yourself.

Feel free to reopen if you have further questions.