class documentation

class CacheResolver(common.ResolverBase): (source)

View In Hierarchy

A resolver that serves records from a local, memory cache.
Method __getstate__ Undocumented
Method __init__ Undocumented
Method __setstate__ Undocumented
Method cache​Result Cache a DNS entry.
Method clear​Entry Undocumented
Method lookup​All​Records Perform an ALL_RECORD lookup.
Instance Variable __dict__ Undocumented
Instance Variable cache Undocumented
Instance Variable cancel Undocumented
Instance Variable verbose Undocumented
Method _lookup Undocumented
Instance Variable _reactor A provider of interfaces.IReactorTime.

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 __getstate__(self): (source)

Undocumented

def __init__(self, cache=None, verbose=0, reactor=None): (source)
def __setstate__(self, state): (source)

Undocumented

def cacheResult(self, query, payload, cacheTime=None): (source)
Cache a DNS entry.
Parameters
querya dns.Query instance.
payloada 3-tuple of lists of dns.RRHeader records, the matching result of the query (answers, authority and additional).
cache​TimeThe time (seconds since epoch) at which the entry is considered to have been added to the cache. If None is given, the current time is used.
def clearEntry(self, query): (source)

Undocumented

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.
__dict__ = (source)

Undocumented

cache: dict = (source)

Undocumented

cancel: dict = (source)

Undocumented

verbose = (source)

Undocumented

def _lookup(self, name, cls, type, timeout): (source)
_reactor = (source)
A provider of interfaces.IReactorTime.