userver
C++ Async Framework
Loading...
Searching...
No Matches
resolver_utils.hpp
1
#
pragma
once
2
3
#
include
<
userver
/
clients
/
dns
/
exception
.
hpp
>
4
#
include
<
userver
/
clients
/
dns
/
resolver_fwd
.
hpp
>
5
#
include
<
userver
/
components
/
component_fwd
.
hpp
>
6
7
USERVER_NAMESPACE_BEGIN
8
9
namespace
clients::dns {
10
11
/// Resolver types used by the components
12
enum
class
ResolverType
{
13
kGetaddrinfo
,
///< resolve hosts using blocking getaddrinfo call
14
kAsync
,
///< use non-blocking resolver
15
};
16
17
/// Returns pointer to asynchronous resolver interface if required by config
18
/// or nullptr for getaddrinfo
19
/// @throws InvalidConfigException on unknown resolver type in config
20
clients::dns::Resolver*
GetResolverPtr
(
21
const
components
::ComponentConfig& config,
22
const
components
::ComponentContext& context,
23
ResolverType
default_type =
ResolverType
::
kAsync
);
24
25
}
// namespace clients::dns
26
27
USERVER_NAMESPACE_END
userver
clients
dns
resolver_utils.hpp
Generated on Wed May 15 2024 22:14:56 for userver by
Doxygen
1.10.0