pub struct DnsPkarrServer {
pub node_origin: String,
pub nameserver: SocketAddr,
pub pkarr_url: Url,
/* private fields */
}
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
Available on
test
or crate feature test-utils
only.Expand description
Handle and drop guard for test DNS and Pkarr servers.
Once the struct is dropped the servers will shut down.
Fields§
§node_origin: String
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
The node origin domain.
nameserver: SocketAddr
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
The socket address of the DNS server.
pkarr_url: Url
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
The HTTP URL of the Pkarr server.
Implementations§
Source§impl DnsPkarrServer
impl DnsPkarrServer
Sourcepub async fn run() -> Result<Self>
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub async fn run() -> Result<Self>
Run DNS and Pkarr servers on localhost.
Sourcepub async fn run_with_origin(node_origin: String) -> Result<Self>
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub async fn run_with_origin(node_origin: String) -> Result<Self>
Run DNS and Pkarr servers on localhost with the specified node_origin
domain.
Sourcepub fn discovery(&self, secret_key: SecretKey) -> Box<ConcurrentDiscovery>
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn discovery(&self, secret_key: SecretKey) -> Box<ConcurrentDiscovery>
Create a ConcurrentDiscovery
with DnsDiscovery
and PkarrPublisher
configured to use the test servers.
Sourcepub fn dns_resolver(&self) -> DnsResolver
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn dns_resolver(&self) -> DnsResolver
Create a DnsResolver
configured to use the test DNS server.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DnsPkarrServer
impl !RefUnwindSafe for DnsPkarrServer
impl Send for DnsPkarrServer
impl Sync for DnsPkarrServer
impl Unpin for DnsPkarrServer
impl !UnwindSafe for DnsPkarrServer
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more