-
Notifications
You must be signed in to change notification settings - Fork 984
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
All crates should have a consistent API & naming #2217
Comments
I followed the same approach outlined here in #2859 and introduced top-level |
…ler` (#2859) Previously, the `DummyConnectionHandler` offered a "keep alive" functionality, i.e. it allowed users to set the value of what is returned from `ConnectionHandler::keep_alive`. This handler is primarily used in tests or `NetworkBehaviour`s that don't open any connections (like mDNS). In all of these cases, it is statically known whether we want to keep connections alive. As such, this functionality is better represented by a static `KeepAliveConnectionHandler` that always returns `KeepAlive::Yes` and a `DummyConnectionHandler` that always returns `KeepAlive::No`. To follow the naming conventions described in #2217, we introduce a top-level `keep_alive` and `dummy` behaviour in `libp2p-swarm` that contains both the `NetworkBehaviour` and `ConnectionHandler` implementation for either case.
This follows the guidelines discussed in #2217.
This follows the guidelines discussed in #2217.
…#3213) `cargo semver-checks` is still missing features in regards to properly detecting renamed exports. To make our CI pass again, we remove the renamed export, replace it with type-aliases and deprecate them to point users types exported under a module which now follows the conventions set in #2217.
With this patch, the naming of types follows the guidelines discussed in #2217.
In the libp2p specs, the only handshake pattern that is specified is the XX handshake. Support for other handshake patterns can be added through external modules. While we are at it, we rename the remaining types to following the laid out naming convention. The tests for handshakes other than XX are removed. The handshakes still work as we don't touch them in this patch. Related #2217. Pull-Request: #3768.
Renamed the following - `dns::GenDnsConfig` -> `dns::Config` - `dns::DnsConfig` -> `dns::async_std::Config` - `dns::TokioDnsConfig` -> `dns::tokio::Config` If async-std feature is enable, use `dns::async_std::Config`. When using tokio, import `dns::tokio::Config` . There is no need to use `dns::Config` directly. Resolves #4486. Related: #2217. Pull-Request: #4505.
Discussed in #2174.
Summary:
Rename symbols within
libp2p-
sub crates such that they can best be references via the module that is re-exported from thelibp2p
meta-crate. For example:Crates
Tasks
Ping
prefix #2937The text was updated successfully, but these errors were encountered: