-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Resolver::resolveAll #67
Conversation
$factory = new Factory(); | ||
$resolver = $factory->create('8.8.8.8', $loop); | ||
|
||
$name = isset($argv[1]) ? $argv[1] : 'blog.wyrihaximus.net'; |
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.
In case anyone wonders why my own blog, because it is hosted on AWS CloudFront and this always returns more then one IP Address
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 add that as a code comment rather than review comment.
src/Resolver/Resolver.php
Outdated
}); | ||
} | ||
|
||
public function extractAddress(Query $query, Message $response) | ||
public function extractAddresses(Query $query, Message $response) |
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.
Is this an intended BC break?
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.
I agree here, while this method isn't intended to be used from the outside, it's still part of our (current) public API.
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.
Thanks, let's resolve the minor BC break below and let's get this in!
src/Resolver/Resolver.php
Outdated
}); | ||
} | ||
|
||
public function extractAddress(Query $query, Message $response) | ||
public function extractAddresses(Query $query, Message $response) |
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.
I agree here, while this method isn't intended to be used from the outside, it's still part of our (current) public API.
The status quo with the resolver is that
resolve
will always return oneIP
address when resolving a hostname, even when the query response yields more. This proposedresolveAll
method will return all addresses yielded from the query response.