userver: clients::dns Namespace Reference
Loading...
Searching...
No Matches
clients::dns Namespace Reference

Detailed Description

DNS client.

Classes

class  Component
 Caching DNS resolver component. More...
 
class  InvalidConfigException
 Configuration error. More...
 
class  NotResolvedException
 Host resolution error. More...
 
class  Resolver
 Caching DNS resolver implementation. More...
 
struct  ResolverConfig
 Caching DNS resolver static configuration. More...
 
class  ResolverException
 Generic resolver error. More...
 
class  UnsupportedDomainException
 Unsupported domain error. More...
 

Typedefs

using AddrVector = boost::container::small_vector<engine::io::Sockaddr, 4>
 

Enumerations

enum class  ResolverType {
  kGetaddrinfo ,
  kAsync
}
 Resolver types used by the components. More...
 

Functions

clients::dns::ResolverGetResolverPtr (const components::ComponentConfig &config, const components::ComponentContext &context, ResolverType default_type=ResolverType::kAsync)
 

Typedef Documentation

◆ AddrVector

using clients::dns::AddrVector = boost::container::small_vector<engine::io::Sockaddr, 4>

Definition at line 15 of file common.hpp.

Enumeration Type Documentation

◆ ResolverType

enum class clients::dns::ResolverType
strong

Resolver types used by the components.

Enumerator
kGetaddrinfo 

resolve hosts using blocking getaddrinfo call

kAsync 

use non-blocking resolver

Definition at line 12 of file resolver_utils.hpp.

Function Documentation

◆ GetResolverPtr()

clients::dns::Resolver * clients::dns::GetResolverPtr ( const components::ComponentConfig & config,
const components::ComponentContext & context,
ResolverType default_type = ResolverType::kAsync )

Returns pointer to asynchronous resolver interface if required by config or nullptr for getaddrinfo

Exceptions
InvalidConfigExceptionon unknown resolver type in config