-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(iroh,iroh-net)!: prefer remote
to connection
in api
#2610
Conversation
This migrates Endpoint::connection_info and Endpoint::connection_infos to Endpoint::node_info and Endpoint::node_info_iter. This returns information about nodes in the node map. This has not that much to do with connections. Calling this connections is rather misleading. It documents all types below it properly, deprecating some problematic fields and functions.
@dignifiedquire while this doesn't work yet could I get some feedback on using deprecations? Also on the rename itself from |
given we haven't used deprecations for the last rounds of api changes, I don't think they are necessary currently |
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2610/docs/iroh/ Last updated: 2024-08-17T17:46:11Z |
I think this is a great name change: the original name is from when this data was ephemeral. I agree, it makes no sense now. |
remote
to connection
in api
remote
to connection
in apiremote
to connection
in api
Description
Moves some functions and types to use
remote
to describe the information we know about a node,instead of connections. This, based on the fact that iroh-net does not itself handle connections,
making the wording misleading at best.
Breaking Changes
iroh
client::node::Client::connection_info
->client::node::Client::remote_info
client::node::Client::connections
->client::node::Client::remote_infos_iter
iroh-net
endpoint::ConnectionInfo
->endpoint::RemoteInfo
endpoint::ConnectionInfo::id
is removed since it's internal information.endpoint::ConnectionInfo::last_alive_relay
is deprecated. Use.relay_url.last_alive
endpoint::Endpoint::connection_info
->endpoint::Endpoint::remote_info
endpoint::Endpoint::connection_infos
->endpoint::Endpoint::remote_infos_iter
iroh-cli (bin)
node connection-info
->node remote-info
node connections
->node remote-list
Notes & open questions
a new
net
top level api. Doing so we should aim as well to move the cli to the more graciousremote <node-id>
andremote list
. In summary:iroh node remote <node-id>
and we wantiroh net remote <remote-id>
iroh node remote-list
and we wantiroh net remote list
Issue add top level
net
api #2639 is created for thisendpoint::ConnectionInfo::last_alive_relay
#2640 is created for this.Change checklist
Tests if relevant.