mirror of
https://github.com/danog/dns.git
synced 2024-11-30 04:29:06 +01:00
Update for async-interop namespace change
This commit is contained in:
parent
e13372219a
commit
f4055e5a52
@ -6,7 +6,7 @@ use Amp\{ CallableMaker, Coroutine, Deferred, Failure, MultiReasonException, Suc
|
||||
use Amp\Cache\ArrayCache;
|
||||
use Amp\File\FilesystemException;
|
||||
use Amp\WindowsRegistry\{ KeyNotFoundException, WindowsRegistry };
|
||||
use Interop\Async\{ Loop, Promise };
|
||||
use AsyncInterop\{ Loop, Promise };
|
||||
use LibDNS\{ Decoder\DecoderFactory, Encoder\EncoderFactory };
|
||||
use LibDNS\Messages\{ MessageFactory, MessageTypes };
|
||||
use LibDNS\Records\QuestionFactory;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Amp\Dns;
|
||||
|
||||
use Interop\Async\Promise;
|
||||
use AsyncInterop\Promise;
|
||||
|
||||
interface Resolver {
|
||||
/**
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Amp\Dns;
|
||||
|
||||
use Interop\Async\{ Loop, Promise };
|
||||
use AsyncInterop\{ Loop, Promise };
|
||||
|
||||
const LOOP_STATE_IDENTIFIER = Resolver::class;
|
||||
|
||||
@ -61,7 +61,7 @@ function driver(): Resolver {
|
||||
*
|
||||
* @param string $name The hostname to resolve
|
||||
* @param array $options
|
||||
* @return \Interop\Async\Promise
|
||||
* @return \AsyncInterop\Promise
|
||||
* @TODO add boolean "clear_cache" option flag
|
||||
*/
|
||||
function resolve(string $name, array $options = []): Promise {
|
||||
@ -73,7 +73,7 @@ function resolve(string $name, array $options = []): Promise {
|
||||
* @param string $name Unlike resolve(), query() allows for requesting _any_ name (as DNS RFC allows for arbitrary strings)
|
||||
* @param int|int[] $type Use constants of Amp\Dns\Record
|
||||
* @param array $options @see resolve documentation
|
||||
* @return \Interop\Async\Promise
|
||||
* @return \AsyncInterop\Promise
|
||||
*/
|
||||
function query(string $name, $type, array $options = []): Promise {
|
||||
return resolver()->query($name, $type, $options);
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Amp\Dns\Test;
|
||||
|
||||
use Interop\Async\Loop;
|
||||
use AsyncInterop\Loop;
|
||||
|
||||
class IntegrationTest extends \PHPUnit_Framework_TestCase {
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user