Skip to content
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

dns: rename to follow naming convention across repositry #4486

Closed
Tracked by #2217
thomaseizinger opened this issue Sep 12, 2023 · 3 comments · Fixed by #4505
Closed
Tracked by #2217

dns: rename to follow naming convention across repositry #4486

thomaseizinger opened this issue Sep 12, 2023 · 3 comments · Fixed by #4505

Comments

@thomaseizinger
Copy link
Contributor

thomaseizinger commented Sep 12, 2023

As tracked in #2217, we should rename the symbols in the libp2p::dns module to follow the naming convention.

This module has two flavours, one for the tokio runtime and one for the async_std runtime. The libp2p::tcp module should provide a good inspiration as to what we'd like the API to look like: https://docs.rs/libp2p/latest/libp2p/tcp/index.html

@whtsht
Copy link
Contributor

whtsht commented Sep 14, 2023

Hello, @thomaseizinger. I would like to tackle this issue. Is it okay to just separate the type declarations that depend on tokio and async-std into libp2p::dns::tokio and libp2p::dns::async_io?

@thomaseizinger
Copy link
Contributor Author

Hello, @thomaseizinger. I would like to tackle this issue. Is it okay to just separate the type declarations that depend on tokio and async-std into libp2p::dns::tokio and libp2p::dns::async_io?

Great, thank you!

Yeah, more or less. We'd still like to reduce code duplication as much as possible. If you haven't yet, take a look at how the TCP transport is organised. DNS should roughly be the same :)

@whtsht
Copy link
Contributor

whtsht commented Sep 14, 2023

I checked #2961. It seems that integrating GenDnsConfig with Config would be beneficial. Once the work is complete, I will submit a pull request.

@mergify mergify bot closed this as completed in #4505 Sep 24, 2023
mergify bot pushed a commit that referenced this issue Sep 24, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants