-
Notifications
You must be signed in to change notification settings - Fork 199
[1.7.0] Custom resolver option #241
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
Conversation
docs/source/driver.rst
Outdated
``resolver`` | ||
------------ | ||
|
||
A custom resolver function to use for DNS resolution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can say that it is a hostname or IP address resolver and default implementation performs DNS resolution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Yes, that's better wording.
I'm not sure this should replace getaddrinfo. I'd rather that it just comes before getaddrinfo as a straight transform - so I can return new hostnames or ip addresses e.g. in AWS I might want to transform an external hostname to an internal hostname using some regex - but I still want you to do the DNS resolution. |
That's an interesting idea. Maybe we should also fall back to |
What I'd like is something that works with
given
usage example |
This PR adds an option to pass a custom resolver function into the driver configuration. This allows an override of the regular
getaddrinfo
call used for DNS resolution, introducing the possibility for multiple addresses to be provided for bootstrapping the routing process.