Caching DNS resolver implementation.
More...
#include <userver/clients/dns/resolver.hpp>
|
| Resolver (engine::TaskProcessor &fs_task_processor, const ResolverConfig &config) |
|
| Resolver (const Resolver &)=delete |
|
| Resolver (Resolver &&)=delete |
|
AddrVector | Resolve (const std::string &name, engine::Deadline deadline) |
|
const LookupSourceCounters & | GetLookupSourceCounters () const |
| Returns lookup source counters.
|
|
void | ReloadHosts () |
| Forces the reload of lookup table file. Waits until the reload is done.
|
|
void | FlushNetworkCache () |
| Resets the network results cache.
|
|
void | FlushNetworkCache (const std::string &name) |
| Removes the specified domain name from the network results cache.
|
|
Caching DNS resolver implementation.
Usually retrieved from clients::dns::Component.
Combines file-based (/etc/hosts) name resolution with network-based one.
Definition at line 26 of file resolver.hpp.
◆ Resolve()
AddrVector clients::dns::Resolver::Resolve |
( |
const std::string & |
name, |
|
|
engine::Deadline |
deadline |
|
) |
| |
Performs a domain name resolution.
Sources are tried in the following order:
- Cached file lookup table
- Cached network resolution results
- Network name servers
- Exceptions
-
The documentation for this class was generated from the following file: