Struct iroh_dns_server::ZoneStore
source · pub struct ZoneStore { /* private fields */ }
Expand description
A store for pkarr signed packets.
Packets are stored in the persistent [SignedPacketStore
], and cached on-demand in an in-memory LRU
cache used for resolving DNS queries.
Implementations§
source§impl ZoneStore
impl ZoneStore
sourcepub fn persistent(path: impl AsRef<Path>) -> Result<Self>
pub fn persistent(path: impl AsRef<Path>) -> Result<Self>
Create a persistent store
sourcepub fn with_mainline_fallback(self, bootstrap: BootstrapOption) -> Self
pub fn with_mainline_fallback(self, bootstrap: BootstrapOption) -> Self
Configure a pkarr client for resolution of packets from the bittorrent mainline DHT.
This will be used only as a fallback if there is no local info available.
Optionally set custom bootstrap nodes. If bootstrap
is empty it will use the default
mainline bootstrap nodes.
sourcepub async fn resolve(
&self,
pubkey: &PublicKeyBytes,
name: &Name,
record_type: RecordType
) -> Result<Option<Arc<RecordSet>>>
pub async fn resolve( &self, pubkey: &PublicKeyBytes, name: &Name, record_type: RecordType ) -> Result<Option<Arc<RecordSet>>>
Resolve a DNS query.
sourcepub async fn get_signed_packet(
&self,
pubkey: &PublicKeyBytes
) -> Result<Option<SignedPacket>>
pub async fn get_signed_packet( &self, pubkey: &PublicKeyBytes ) -> Result<Option<SignedPacket>>
Get the latest signed packet for a pubkey.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ZoneStore
impl !RefUnwindSafe for ZoneStore
impl Send for ZoneStore
impl Sync for ZoneStore
impl Unpin for ZoneStore
impl !UnwindSafe for ZoneStore
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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