You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.
After chats with @dignifiedquire and @b5, and after considering API notes from @flub on the WIP PR concerning these refactors, we've decided to adjust this goal.
We are going to limit the exposure of some of our lower level APIs and have settled on these changes:
We need a public pub/sub interface:
a subscribe method that returns a stream of GossipsubEvents on that topic
a publish method that you can send messages on a topic
an unsubscribe method that you can use to unsubscribe to a topic
an add_peer method that explicitly adds the given peer to your pub/sub network
We need to make adjustments to certain RPC methods to get this to work properly:
gossipsub_subscribe should return a stream of GossipsubEvents
A way to configure the get process to tell it how you want your data fetched. For now, I'm scoping this down to get_from_peers, that allows you to use a list of PeerIds as your providers, rather than fetching the providers off the DHT or getting the providers from something like cid.contact
get_from_providers
LoaderFromProviders ContextLoader
previous issue contents for posterity:
feat(rpc, api): add network_events, and Gossipsub IPC methods
need a network_events method that returns a stream of NetworkEvents emitted by the p2p node
add p2p/rpc test~
expose gossipsub_subscribe to the iroh-api
expose gossipsub_publish to iroh-api
Exposing/adding these methods to IPC so we can use iroh-embed inside iroh-share (iroh-share uses Gossipsub & expects to be able to inspect Gossipsub network events). Ignoring exposing the other Gossipsub RPC methods for now, and only implementing what is needed for the use case.
The text was updated successfully, but these errors were encountered:
After chats with @dignifiedquire and @b5, and after considering API notes from @flub on the WIP PR concerning these refactors, we've decided to adjust this goal.
We are going to limit the exposure of some of our lower level APIs and have settled on these changes:
subscribe
method that returns a stream ofGossipsubEvents
on that topicpublish
method that you can send messages on a topicunsubscribe
method that you can use to unsubscribe to a topicadd_peer
method that explicitly adds the given peer to your pub/sub networkgossipsub_subscribe
should return a stream ofGossipsubEvents
get
process to tell it how you want your data fetched. For now, I'm scoping this down toget_from_peers
, that allows you to use a list of PeerIds as your providers, rather than fetching the providers off the DHT or getting the providers from something like cid.contactget_from_providers
LoaderFromProviders
ContextLoaderprevious issue contents for posterity:
feat(rpc, api): add network_events, and Gossipsub IPC methods
network_events
method that returns a stream ofNetworkEvents
emitted by the p2p nodegossipsub_subscribe
to theiroh-api
gossipsub_publish
toiroh-api
Exposing/adding these methods to IPC so we can use
iroh-embed
insideiroh-share
(iroh-share
uses Gossipsub & expects to be able to inspect Gossipsub network events). Ignoring exposing the other Gossipsub RPC methods for now, and only implementing what is needed for the use case.The text was updated successfully, but these errors were encountered: