pub struct DnsResolver {
pub backends: Arc<DynamicBackends>,
/* private fields */
}Expand description
Handle to the background DNS resolver. Aborting the task on drop ensures we don’t leak spawned work.
Fields§
§backends: Arc<DynamicBackends>The dynamically-updated backend list. Shared with whoever needs to read the current set of upstreams.
Implementations§
Source§impl DnsResolver
impl DnsResolver
Sourcepub fn start(config: &DynamicUpstreamConfig) -> Self
pub fn start(config: &DynamicUpstreamConfig) -> Self
Start a background task that periodically resolves config.dns_name
and updates the shared backend list.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DnsResolver
impl RefUnwindSafe for DnsResolver
impl Send for DnsResolver
impl Sync for DnsResolver
impl Unpin for DnsResolver
impl UnsafeUnpin for DnsResolver
impl UnwindSafe for DnsResolver
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