pub struct OMDomainResolver<PH: Deref>where
PH::Target: DNSResolverMessageHandler,{ /* private fields */ }Expand description
A resolver which implements DNSResolverMessageHandler and replies to DNSSECQuery
messages with with DNSSECProofs.
Implementations§
Source§impl OMDomainResolver<IgnoringMessageHandler>
impl OMDomainResolver<IgnoringMessageHandler>
Sourcepub fn ignoring_incoming_proofs(resolver: SocketAddr) -> Self
pub fn ignoring_incoming_proofs(resolver: SocketAddr) -> Self
Creates a new OMDomainResolver given the SocketAddr of a DNS resolver listening on
TCP (e.g. 8.8.8.8:53, 1.1.1.1:53 or your local DNS resolver).
Ignores any incoming DNSSECProof messages.
Source§impl<PH: Deref> OMDomainResolver<PH>where
PH::Target: DNSResolverMessageHandler,
impl<PH: Deref> OMDomainResolver<PH>where
PH::Target: DNSResolverMessageHandler,
Sourcepub fn new(resolver: SocketAddr, proof_handler: Option<PH>) -> Self
pub fn new(resolver: SocketAddr, proof_handler: Option<PH>) -> Self
Creates a new OMDomainResolver given the SocketAddr of a DNS resolver listening on
TCP (e.g. 8.8.8.8:53, 1.1.1.1:53 or your local DNS resolver).
Uses tokio’s Handle::current to fetch the async runtime on which futures will be
spawned.
The optional proof_handler can be provided to pass proofs coming back to us to the
underlying handler. This is useful when this resolver is handling incoming resolution
requests but some other handler is making proof requests of remote nodes and wants to get
results.
Sourcepub fn with_runtime(
resolver: SocketAddr,
proof_handler: Option<PH>,
runtime_handle: Option<Handle>,
) -> Self
pub fn with_runtime( resolver: SocketAddr, proof_handler: Option<PH>, runtime_handle: Option<Handle>, ) -> Self
Creates a new OMDomainResolver given the SocketAddr of a DNS resolver listening on
TCP (e.g. 8.8.8.8:53, 1.1.1.1:53 or your local DNS resolver) and a tokio runtime
Handle on which futures will be spawned. If no runtime is provided, set_runtime must
be called before any queries will be handled.
The optional proof_handler can be provided to pass proofs coming back to us to the
underlying handler. This is useful when this resolver is handling incoming resolution
requests but some other handler is making proof requests of remote nodes and wants to get
results.
Sourcepub fn set_runtime(&self, runtime_handle: Handle)
pub fn set_runtime(&self, runtime_handle: Handle)
Sets the runtime on which futures will be spawned.
Trait Implementations§
Source§impl<PH: Deref> DNSResolverMessageHandler for OMDomainResolver<PH>where
PH::Target: DNSResolverMessageHandler,
impl<PH: Deref> DNSResolverMessageHandler for OMDomainResolver<PH>where
PH::Target: DNSResolverMessageHandler,
Source§fn handle_dnssec_proof(&self, proof: DNSSECProof, context: DNSResolverContext)
fn handle_dnssec_proof(&self, proof: DNSSECProof, context: DNSResolverContext)
Source§fn handle_dnssec_query(
&self,
q: DNSSECQuery,
responder_opt: Option<Responder>,
) -> Option<(DNSResolverMessage, ResponseInstruction)>
fn handle_dnssec_query( &self, q: DNSSECQuery, responder_opt: Option<Responder>, ) -> Option<(DNSResolverMessage, ResponseInstruction)>
DNSSECQuery message. Read moreSource§fn provided_node_features(&self) -> NodeFeatures
fn provided_node_features(&self) -> NodeFeatures
dns_resolver flag if this handler supports returning DNSSECProof messages in response
to DNSSECQuery messages.Source§fn release_pending_messages(
&self,
) -> Vec<(DNSResolverMessage, MessageSendInstructions)>
fn release_pending_messages( &self, ) -> Vec<(DNSResolverMessage, MessageSendInstructions)>
DNSResolverMessages that need to be sent.