diff options
author | Bob Halley <halley@dnspython.org> | 2020-05-23 18:04:12 -0700 |
---|---|---|
committer | Bob Halley <halley@dnspython.org> | 2020-05-23 18:04:12 -0700 |
commit | acc56930b967b34bea86371112ce5699ec951de6 (patch) | |
tree | 2ddee82eafa7efb13358530c046a543c73ef083b | |
parent | c0e4a918d7aa2e3298ba0264d3d798050d53d771 (diff) | |
download | dnspython-acc56930b967b34bea86371112ce5699ec951de6.tar.gz |
document Trio code
-rw-r--r-- | doc/manual.rst | 1 | ||||
-rw-r--r-- | doc/trio-query.rst | 28 | ||||
-rw-r--r-- | doc/trio-resolver-class.rst | 11 | ||||
-rw-r--r-- | doc/trio-resolver-functions.rst | 8 | ||||
-rw-r--r-- | doc/trio-resolver.rst | 12 | ||||
-rw-r--r-- | doc/trio.rst | 20 |
6 files changed, 80 insertions, 0 deletions
diff --git a/doc/manual.rst b/doc/manual.rst index 440eafd..48243fa 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -12,5 +12,6 @@ Dnspython Manual resolver zone dnssec + trio exceptions utilities diff --git a/doc/trio-query.rst b/doc/trio-query.rst new file mode 100644 index 0000000..d4d0392 --- /dev/null +++ b/doc/trio-query.rst @@ -0,0 +1,28 @@ +.. module:: dns.trio.query +.. _trio-query: + +DNS Query Support +================= + +The ``dns.trio.query`` module is for sending messages to DNS servers, and +processing their responses. If you want "stub resolver" behavior, then +you should use the higher level ``dns.trio.resolver`` module; see +:ref:`trio_resolver`. + +There is currently no support for zone transfers or DNS-over-HTTPS +using Trio, but we hope to offer this in the future. + +UDP +--- + +.. autofunction:: dns.trio.query.udp +.. autofunction:: dns.trio.query.udp_with_fallback +.. autofunction:: dns.trio.query.send_udp +.. autofunction:: dns.trio.query.receive_udp + +Streams (TCP and TLS) +--------------------- + +.. autofunction:: dns.trio.query.stream +.. autofunction:: dns.trio.query.send_stream +.. autofunction:: dns.trio.query.receive_stream diff --git a/doc/trio-resolver-class.rst b/doc/trio-resolver-class.rst new file mode 100644 index 0000000..537c933 --- /dev/null +++ b/doc/trio-resolver-class.rst @@ -0,0 +1,11 @@ +.. _trio-resolver-class: + +The dns.trio.resolver.Resolver Class +------------------------------------ + +The Trio resolver is a subclass of ``dns.resolver.Resolver`` and has the +same attributes. The methods are similar, but I/O methods like ``resolve()`` +are asynchronous. + +.. autoclass:: dns.trio.resolver.Resolver + :members: diff --git a/doc/trio-resolver-functions.rst b/doc/trio-resolver-functions.rst new file mode 100644 index 0000000..2a6ab31 --- /dev/null +++ b/doc/trio-resolver-functions.rst @@ -0,0 +1,8 @@ +.. _trio-resolver-functions: + +Trio Resolver Functions +======================= + +.. autofunction:: dns.trio.resolver.resolve +.. autofunction:: dns.trio.resolver.resolve_address +.. autofunction:: dns.trio.resolver.zone_for_name diff --git a/doc/trio-resolver.rst b/doc/trio-resolver.rst new file mode 100644 index 0000000..ccd7824 --- /dev/null +++ b/doc/trio-resolver.rst @@ -0,0 +1,12 @@ +.. module:: dns.trio.resolver +.. _trio_resolver: + +Stub Resolver +============= + +Dnspython's Trio resolver module implements an asynchronous "stub resolver". + +.. toctree:: + + trio-resolver-class + trio-resolver-functions diff --git a/doc/trio.rst b/doc/trio.rst new file mode 100644 index 0000000..3afad5f --- /dev/null +++ b/doc/trio.rst @@ -0,0 +1,20 @@ +.. module:: dns.trio +.. _trio: + +Trio Asynchronous I/O Support +============================= + +The ``dns.trio.query`` module offers very similar APIs to those of +``dns.query``, only these versions are asynchronous and use Trio for +I/O. There are no timeout parameters, as timeouts are expected to be +done in the Trio style with a cancellation scope. + +The ``dns.trio.resolver`` module offers very similar APIs to those of +``dns.query``, only these versions are asynchronous and use Trio for +I/O. There are no timeout parameters, as timeouts are expected to be +done in the Trio style with a cancellation scope. + +.. toctree:: + + trio-query + trio-resolver |