Files
iroh/iroh-cli
9d068886f1 refactor(iroh,iroh-net)!: prefer remote to connection in api (#2610)
## 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

1. We decided to also move many of the (currently) node commands that
come directly from iroh-net to
a new `net` top level api. Doing so we should aim as well to move the
cli to the more gracious
   `remote <node-id>` and `remote list`. In summary:
- we have `iroh node remote <node-id>` and we want `iroh net remote
<remote-id>`
  - we have `iroh node remote-list` and we want `iroh net remote list`
  Issue #2639 is created for this
2. This adds a deprecation that needs to be removed later. Issue #2640
is created for this.

## Change checklist

- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] ~~Tests if relevant.~~
- [x] All breaking changes documented.

---------

Co-authored-by: Diva M <divma@protonmail.com>
Co-authored-by: Kasey <kasey@n0.computer>
2024-08-17 17:55:49 +00:00
..
2024-08-05 22:52:25 +02:00

iroh-cli

The CLI for iroh.

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.