-
Notifications
You must be signed in to change notification settings - Fork 37
ipldResolver API as pullStreams #101
Comments
here are the events i used to make the |
Making I want to keep the API as simple as possible and let any extra porcelain in users land so that we do not increase the size of the codebase (=== tests, maintenance and bundle sizes) until it is completely obvious that it is a really good nice to have. Following ipfs-inactive/interface-js-ipfs-core#126 (comment), I propose two API changes. a) add an option to the .get options object to just return the final result (by default it should return all the touched objects) b) expose two API calls, one that it is .get that returns an array with all the nodes touched and another one that it is .getPullStream that does the same but returns all the nodes touched in a pull-stream As for the porcelain such as createSpyStream, you can in your codebase create a proxy for .get calls that keeps track of all objects traversed and returns on the SpyStream or you can monkey patch the IPFS node when to create it in your code. |
@diasdavid just to be clear on this, I'd be replacing the existing get method? Trying to get a sense of what other projects I'd want to look at/ patch if this is the case. |
With the Awesome Endeavour: Async Iterators we want to move away from pull streams. There's also an upcoming API review of all the IPLD stuff, so it doesn't make sense to spend more time on this for now. |
Thanks for the heads up!
…On Wed, Nov 14, 2018 at 5:30 AM Volker Mische ***@***.***> wrote:
With the Awesome Endeavour: Async Iterators
<ipfs/js-ipfs#1670> we want to move away from
pull streams. There's also an upcoming API review of all the IPLD stuff, so
it doesn't make sense to spend more time on this for now.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#101 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAKkg7bOF5oIsfDQy-QBOsX9MQA5uSGQks5uvBrmgaJpZM4P8tuV>
.
|
We son't use pull-streams anymore, hence closing this issue. |
would be nice to do a
ipldResolver.get
and get back a pullStream that passes back all nodes touchedwould also be nice (for analytics) to be able to spy on all nodes being resolved by any request, something like a
ipldResolver.createSpyStream()
cc @diasdavid
The text was updated successfully, but these errors were encountered: