deploy: 547e5419e0dd16f0b6e88662c43f8c4a6f79c6d9

This commit is contained in:
Frando
2025-02-06 09:06:22 +00:00
parent b695cfa39a
commit db7bd8aaf2
16 changed files with 49 additions and 31 deletions
File diff suppressed because one or more lines are too long
@@ -17,9 +17,9 @@ The supported attributes are:</p>
with <a href="../../endpoint/struct.Builder.html#method.dns_resolver" title="method iroh::endpoint::Builder::dns_resolver"><code>crate::endpoint::Builder::dns_resolver</code></a>.</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-DnsDiscovery" class="impl"><a class="src rightside" href="../../../src/iroh/discovery/dns.rs.html#41-63">Source</a><a href="#impl-DnsDiscovery" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.DnsDiscovery.html" title="struct iroh::discovery::dns::DnsDiscovery">DnsDiscovery</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../../../src/iroh/discovery/dns.rs.html#43-45">Source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(origin_domain: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Creates a new DNS discovery.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.n0_dns" class="method"><a class="src rightside" href="../../../src/iroh/discovery/dns.rs.html#56-62">Source</a><h4 class="code-header">pub fn <a href="#method.n0_dns" class="fn">n0_dns</a>() -&gt; Self</h4></section></summary><div class="docblock"><p>Creates a new DNS discovery using the <code>iroh.link</code> domain.</p>
<p>This uses the <a href="constant.N0_DNS_NODE_ORIGIN_PROD.html" title="constant iroh::discovery::dns::N0_DNS_NODE_ORIGIN_PROD"><code>N0_DNS_NODE_ORIGIN_PROD</code></a> domain.</p>
<p>This uses the <a href="../../dns/constant.N0_DNS_NODE_ORIGIN_PROD.html" title="constant iroh::dns::N0_DNS_NODE_ORIGIN_PROD"><code>N0_DNS_NODE_ORIGIN_PROD</code></a> domain.</p>
<h5 id="usage-during-tests"><a class="doc-anchor" href="#usage-during-tests">§</a>Usage during tests</h5>
<p>For testing it is possible to use the <a href="constant.N0_DNS_NODE_ORIGIN_STAGING.html" title="constant iroh::discovery::dns::N0_DNS_NODE_ORIGIN_STAGING"><code>N0_DNS_NODE_ORIGIN_STAGING</code></a> domain
<p>For testing it is possible to use the <a href="../../dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html" title="constant iroh::dns::N0_DNS_NODE_ORIGIN_STAGING"><code>N0_DNS_NODE_ORIGIN_STAGING</code></a> domain
with <a href="struct.DnsDiscovery.html#method.new" title="associated function iroh::discovery::dns::DnsDiscovery::new"><code>DnsDiscovery::new</code></a>. This would then use a hosted staging discovery
service for testing purposes.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-DnsDiscovery" class="impl"><a class="src rightside" href="../../../src/iroh/discovery/dns.rs.html#36">Source</a><a href="#impl-Debug-for-DnsDiscovery" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.DnsDiscovery.html" title="struct iroh::discovery::dns::DnsDiscovery">DnsDiscovery</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../../src/iroh/discovery/dns.rs.html#36">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Discovery-for-DnsDiscovery" class="impl"><a class="src rightside" href="../../../src/iroh/discovery/dns.rs.html#65-82">Source</a><a href="#impl-Discovery-for-DnsDiscovery" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.Discovery.html" title="trait iroh::discovery::Discovery">Discovery</a> for <a class="struct" href="struct.DnsDiscovery.html" title="struct iroh::discovery::dns::DnsDiscovery">DnsDiscovery</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.resolve" class="method trait-impl"><a class="src rightside" href="../../../src/iroh/discovery/dns.rs.html#66-81">Source</a><a href="#method.resolve" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Discovery.html#method.resolve" class="fn">resolve</a>(
@@ -0,0 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The n0 testing DNS node origin, for production."><title>N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.32.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh::<wbr>dns</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a>::<wbr><a href="index.html">dns</a></span><h1>Constant <span class="constant">N0_DNS_NODE_ORIGIN_PROD</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_relay/dns.rs.html#21">Source</a> </span></div><pre class="rust item-decl"><code>pub const N0_DNS_NODE_ORIGIN_PROD: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The n0 testing DNS node origin, for production.</p>
</div></details></section></div></main></body></html>
@@ -0,0 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The n0 testing DNS node origin, for testing."><title>N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.32.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iroh::<wbr>dns</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a>::<wbr><a href="index.html">dns</a></span><h1>Constant <span class="constant">N0_DNS_NODE_ORIGIN_STAGING</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_relay/dns.rs.html#23">Source</a> </span></div><pre class="rust item-decl"><code>pub const N0_DNS_NODE_ORIGIN_STAGING: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The n0 testing DNS node origin, for testing.</p>
</div></details></section></div></main></body></html>
+2 -2
View File
@@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="This module exports a DNS resolver, which is also the default resolver used in the `crate::Endpoint` if no custom resolver is configured."><title>iroh::dns - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.32.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module dns</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate iroh</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a></span><h1>Module <span>dns</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh/dns.rs.html#1-36">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This module exports a DNS resolver, which is also the default resolver used in the
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="This module exports a DNS resolver, which is also the default resolver used in the `crate::Endpoint` if no custom resolver is configured."><title>iroh::dns - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.32.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module dns</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#constants" title="Constants">Constants</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate iroh</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a></span><h1>Module <span>dns</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh/dns.rs.html#1-38">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This module exports a DNS resolver, which is also the default resolver used in the
<a href="../endpoint/struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>crate::Endpoint</code></a> if no custom resolver is configured.</p>
<p>The resolver provides methods to resolve domain names to ipv4 and ipv6 addresses,
and to resolve node ids to node addresses.</p>
<p>See the <a href="node_info/index.html" title="mod iroh::dns::node_info"><code>node_info</code></a> module documentation for details on how
iroh node records are structured.</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="node_info/index.html" title="mod iroh::dns::node_info">node_<wbr>info</a></div><div class="desc docblock-short">Support for handling DNS resource records for dialing by <a href="../type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a>.</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.DnsResolver.html" title="struct iroh::dns::DnsResolver">DnsResolver</a></div><div class="desc docblock-short">The DNS resolver used throughout <code>iroh</code>.</div></li></ul></section></div></main></body></html>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="node_info/index.html" title="mod iroh::dns::node_info">node_<wbr>info</a></div><div class="desc docblock-short">Support for handling DNS resource records for dialing by <a href="../type.NodeId.html" title="type iroh::NodeId"><code>NodeId</code></a>.</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.DnsResolver.html" title="struct iroh::dns::DnsResolver">DnsResolver</a></div><div class="desc docblock-short">The DNS resolver used throughout <code>iroh</code>.</div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.N0_DNS_NODE_ORIGIN_PROD.html" title="constant iroh::dns::N0_DNS_NODE_ORIGIN_PROD">N0_<wbr>DNS_<wbr>NODE_<wbr>ORIGIN_<wbr>PROD</a></div><div class="desc docblock-short">The n0 testing DNS node origin, for production.</div></li><li><div class="item-name"><a class="constant" href="constant.N0_DNS_NODE_ORIGIN_STAGING.html" title="constant iroh::dns::N0_DNS_NODE_ORIGIN_STAGING">N0_<wbr>DNS_<wbr>NODE_<wbr>ORIGIN_<wbr>STAGING</a></div><div class="desc docblock-short">The n0 testing DNS node origin, for testing.</div></li></ul></section></div></main></body></html>
+2 -2
View File
@@ -12,8 +12,8 @@ servers or the Mainline DHT. This module supports creating and parsing these re
</li>
<li>
<p><code>&lt;origin-domain&gt;</code> is the domain name of the publishing DNS server,
<a href="../../discovery/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html" title="constant iroh::discovery::dns::N0_DNS_NODE_ORIGIN_PROD"><code>N0_DNS_NODE_ORIGIN_PROD</code></a> is the server operated by number0 for production.
<a href="../../discovery/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html" title="constant iroh::discovery::dns::N0_DNS_NODE_ORIGIN_STAGING"><code>N0_DNS_NODE_ORIGIN_STAGING</code></a> is the server operated by number0 for testing.</p>
<a href="../constant.N0_DNS_NODE_ORIGIN_PROD.html" title="constant iroh::dns::N0_DNS_NODE_ORIGIN_PROD"><code>N0_DNS_NODE_ORIGIN_PROD</code></a> is the server operated by number0 for production.
<a href="../constant.N0_DNS_NODE_ORIGIN_STAGING.html" title="constant iroh::dns::N0_DNS_NODE_ORIGIN_STAGING"><code>N0_DNS_NODE_ORIGIN_STAGING</code></a> is the server operated by number0 for testing.</p>
</li>
<li>
<p><code>TXT</code> is the DNS record type.</p>
+1 -1
View File
@@ -1 +1 @@
window.SIDEBAR_ITEMS = {"mod":["node_info"],"struct":["DnsResolver"]};
window.SIDEBAR_ITEMS = {"constant":["N0_DNS_NODE_ORIGIN_PROD","N0_DNS_NODE_ORIGIN_STAGING"],"mod":["node_info"],"struct":["DnsResolver"]};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,2 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="DNS resolver"><title>iroh_relay::dns - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_relay" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_relay/index.html">iroh_<wbr>relay</a><span class="version">0.32.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module dns</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#constants" title="Constants">Constants</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate iroh_<wbr>relay</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh_relay</a></span><h1>Module <span>dns</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_relay/dns.rs.html#1-399">Source</a> </span></div><span class="item-info"><div class="stab portability">Available on <strong>non-<code>wasm_browser</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>DNS resolver</p>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="DNS resolver"><title>iroh_relay::dns - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_relay" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_relay/index.html">iroh_<wbr>relay</a><span class="version">0.32.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module dns</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#constants" title="Constants">Constants</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate iroh_<wbr>relay</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh_relay</a></span><h1>Module <span>dns</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_relay/dns.rs.html#1-402">Source</a> </span></div><span class="item-info"><div class="stab portability">Available on <strong>non-<code>wasm_browser</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>DNS resolver</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="node_info/index.html" title="mod iroh_relay::dns::node_info">node_<wbr>info</a></div><div class="desc docblock-short">Support for handling DNS resource records for dialing by <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a>.</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.DnsResolver.html" title="struct iroh_relay::dns::DnsResolver">DnsResolver</a></div><div class="desc docblock-short">The DNS resolver used throughout <code>iroh</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.TXT.html" title="struct iroh_relay::dns::TXT">TXT</a></div><div class="desc docblock-short">Record data for a TXT record</div></li><li><div class="item-name"><a class="struct" href="struct.TxtLookup.html" title="struct iroh_relay::dns::TxtLookup">TxtLookup</a></div><div class="desc docblock-short">TXT records returned from <a href="struct.DnsResolver.html#method.lookup_txt" title="method iroh_relay::dns::DnsResolver::lookup_txt"><code>DnsResolver::lookup_txt</code></a></div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.N0_DNS_NODE_ORIGIN_PROD.html" title="constant iroh_relay::dns::N0_DNS_NODE_ORIGIN_PROD">N0_<wbr>DNS_<wbr>NODE_<wbr>ORIGIN_<wbr>PROD</a></div><div class="desc docblock-short">The n0 testing DNS node origin, for production.</div></li><li><div class="item-name"><a class="constant" href="constant.N0_DNS_NODE_ORIGIN_STAGING.html" title="constant iroh_relay::dns::N0_DNS_NODE_ORIGIN_STAGING">N0_<wbr>DNS_<wbr>NODE_<wbr>ORIGIN_<wbr>STAGING</a></div><div class="desc docblock-short">The n0 testing DNS node origin, for testing.</div></li></ul></section></div></main></body></html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+6 -2
View File
@@ -34,7 +34,9 @@
<a href="#33" id="33">33</a>
<a href="#34" id="34">34</a>
<a href="#35" id="35">35</a>
<a href="#36" id="36">36</a></pre></div><pre class="rust"><code><span class="doccomment">//! This module exports a DNS resolver, which is also the default resolver used in the
<a href="#36" id="36">36</a>
<a href="#37" id="37">37</a>
<a href="#38" id="38">38</a></pre></div><pre class="rust"><code><span class="doccomment">//! This module exports a DNS resolver, which is also the default resolver used in the
//! [`crate::Endpoint`] if no custom resolver is configured.
//!
//! The resolver provides methods to resolve domain names to ipv4 and ipv6 addresses,
@@ -43,7 +45,9 @@
//! See the [`node_info`] module documentation for details on how
//! iroh node records are structured.
</span><span class="kw">pub use </span>iroh_relay::dns::{node_info, DnsResolver};
</span><span class="kw">pub use </span>iroh_relay::dns::{
node_info, DnsResolver, N0_DNS_NODE_ORIGIN_PROD, N0_DNS_NODE_ORIGIN_STAGING,
};
<span class="attr">#[cfg(test)]
</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">mod </span>tests {
+7 -1
View File
@@ -397,7 +397,10 @@
<a href="#396" id="396">396</a>
<a href="#397" id="397">397</a>
<a href="#398" id="398">398</a>
<a href="#399" id="399">399</a></pre></div><pre class="rust"><code><span class="doccomment">//! DNS resolver
<a href="#399" id="399">399</a>
<a href="#400" id="400">400</a>
<a href="#401" id="401">401</a>
<a href="#402" id="402">402</a></pre></div><pre class="rust"><code><span class="doccomment">//! DNS resolver
</span><span class="kw">use </span>std::{
fmt::{<span class="self">self</span>, Write},
@@ -604,6 +607,9 @@
</span>}
<span class="doccomment">/// Looks up node info by [`NodeId`] and origin domain name.
///
/// To lookup nodes that published their node info to the DNS servers run by n0,
/// pass [`N0_DNS_NODE_ORIGIN_PROD`] as `origin`.
</span><span class="kw">pub async fn </span>lookup_node_by_id(<span class="kw-2">&amp;</span><span class="self">self</span>, node_id: <span class="kw-2">&amp;</span>NodeId, origin: <span class="kw-2">&amp;</span>str) -&gt; <span class="prelude-ty">Result</span>&lt;NodeAddr&gt; {
<span class="kw">let </span>attrs =
node_info::TxtAttrs::&lt;node_info::IrohAttr&gt;::lookup_by_id(<span class="self">self</span>, node_id, origin).<span class="kw">await</span><span class="question-mark">?</span>;