Add support to specify pre-resolved IP addresses and avoid additional DNS lookup#2
Add support to specify pre-resolved IP addresses and avoid additional DNS lookup#2
Conversation
I feel like we should be able to do a big unification/simplification? It seems like we could remove |
I'm not sure if the ergonomics would be the same. If someone still wanted this library to resolve DNS and to override the TLS hostname, there wouldn't be a way to do that with the |
Yes, agreed, it would somewhat limit the ergonomics. Arguably fine since before last month no one had wanted the |
|
Sounds good. I'll defer to upstream when I open a PR for this branch there and ask if it would make sense to remove the |
Necessary to support this PR MaterializeInc/materialize#26186 by allowing us to specify multiple pre-resolved IP addresses to avoid a DNS lookup inside the library.
I wanted to know what you thought of the API changes before opening the upstream PR. Since we recently also added support for an explicit TLS hostname override https://docs.rs/mysql_async/latest/mysql_async/struct.SslOpts.html#method.with_danger_tls_hostname_override it seems a bit clunky to keep the
hostnamefield on the newHostPortOrUrl::ResolvedHostenum type I introduced, but without that field it's unclear what we should return fromget_ip_or_hostname, which is behind a public method returning a&str