class documentation

class ResolverChain(common.ResolverBase): (source)

Implements interfaces: twisted.internet.interfaces.IResolver

View In Hierarchy

Lookup an address using multiple IResolvers
Method __init__
Method lookup​All​Records Perform an ALL_RECORD lookup.
Instance Variable resolvers Undocumented
Method _lookup Build a dns.Query for the given parameters and dispatch it to each IResolver in self.resolvers until an answer or error.AuthoritativeDomainError is returned.

Inherited from ResolverBase:

Method exception​For​Code Convert a response code (one of the possible values of dns.Message.rCode to an exception instance representing it.
Method get​Host​By​Name Resolve the domain name name into an IP address.
Method lookup​Address Perform an A record lookup.
Method lookup​Address6 Perform an A6 record lookup.
Method lookup​AFSDatabase Perform an AFSDB record lookup.
Method lookup​Authority Perform an SOA record lookup.
Method lookup​Canonical​Name Perform a CNAME record lookup.
Method lookup​Host​Info Perform a HINFO record lookup.
Method lookup​IPV6​Address Perform an AAAA record lookup.
Method lookup​Mail​Box Perform an MB record lookup.
Method lookup​Mailbox​Info Perform an MINFO record lookup.
Method lookup​Mail​Exchange Perform an MX record lookup.
Method lookup​Mail​Group Perform an MG record lookup.
Method lookup​Mail​Rename Perform an MR record lookup.
Method lookup​Nameservers Perform an NS record lookup.
Method lookup​Naming​Authority​Pointer Perform a NAPTR record lookup.
Method lookup​Null Perform a NULL record lookup.
Method lookup​Pointer Perform a PTR record lookup.
Method lookup​Responsibility Perform an RP record lookup.
Method lookup​Sender​Policy Perform a SPF record lookup.
Method lookup​Service Perform an SRV record lookup.
Method lookup​Text Perform a TXT record lookup.
Method lookup​Well​Known​Services Perform a WKS record lookup.
Method lookup​Zone Perform an AXFR record lookup.
Method query Dispatch query to the method which can handle its type.
Instance Variable type​To​Method Undocumented
Method _cb​Records Undocumented
Class Variable _errormap A dict mapping DNS protocol failure response codes to exception classes which will be used to represent those failures.
Class Variable _log Undocumented
def __init__(self, resolvers): (source)
Parameters
resolvers:listA list of IResolver providers.
def lookupAllRecords(self, name, timeout=None): (source)
Perform an ALL_RECORD lookup.
Parameters
nameDNS name to resolve.
timeoutNumber of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
A Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
resolvers = (source)

Undocumented

def _lookup(self, name, cls, type, timeout): (source)
Build a dns.Query for the given parameters and dispatch it to each IResolver in self.resolvers until an answer or error.AuthoritativeDomainError is returned.
Parameters
name:strDNS name to resolve.
cls:intDNS record class.
type:intDNS record type.
timeout:Sequence of intNumber of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.