Add getters for resolver config and options (#2093)
This commit is contained in:
parent
2b1fe9e007
commit
b0b6957b58
@ -175,6 +175,16 @@ impl<R: ConnectionProvider> AsyncResolver<R> {
|
||||
pub fn clear_cache(&self) {
|
||||
self.client_cache.clear_cache();
|
||||
}
|
||||
|
||||
/// Read the config for this resolver.
|
||||
pub fn config(&self) -> &ResolverConfig {
|
||||
&self.config
|
||||
}
|
||||
|
||||
/// Read the options for this resolver.
|
||||
pub fn options(&self) -> &ResolverOpts {
|
||||
&self.options
|
||||
}
|
||||
}
|
||||
|
||||
impl<P: ConnectionProvider> AsyncResolver<P> {
|
||||
|
@ -120,6 +120,16 @@ impl Resolver {
|
||||
self.async_resolver.clear_cache();
|
||||
}
|
||||
|
||||
/// Read the config for this resolver.
|
||||
pub fn config(&self) -> &ResolverConfig {
|
||||
self.async_resolver.config()
|
||||
}
|
||||
|
||||
/// Read the options for this resolver.
|
||||
pub fn options(&self) -> &ResolverOpts {
|
||||
self.async_resolver.options()
|
||||
}
|
||||
|
||||
/// Generic lookup for any RecordType
|
||||
///
|
||||
/// *WARNING* This interface may change in the future, please use [`Self::lookup_ip`] or another variant for more stable interfaces.
|
||||
|
Loading…
Reference in New Issue
Block a user