Move $nameserver from ExecutorInterface to UdpTransportExecutor #135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This changeset removes the
$nameserver
argument from theExecutorInterface
and adds it as a constructor attribute to theUdpTransportExecutor
. This allows for a significant clean up in our APIs as most of the existing implementations ofExecutorInterface
do not care about the nameserver and simply pass it through to some underlying executor. This also allows for future optimizations (such as reusing a single socket for multiple lookups) and helps with future TCP/IP executors (#19) and also multiple DNS servers by implementing fallback strategies as a hierarchy of executors (#6). These APIs are somewhat internal and it's unlikely this will affect many consumers of this package.Additionally, we can now validate the nameserver address and throw an
InvalidArgumentException
if it is invalid.Refs #131
Refs #128