userver: userver/clients/dns/config.hpp Source File
Loading...
Searching...
No Matches
config.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/clients/dns/config.hpp
4/// @brief @copybrief clients::dns::ResolverConfig
5
6#include <chrono>
7#include <string>
8#include <vector>
9
10USERVER_NAMESPACE_BEGIN
11
12namespace clients::dns {
13
14/// Caching DNS resolver static configuration.
16 /// hosts file path
17 std::string file_path{"/etc/hosts"};
18
19 /// hosts file update interval
20 std::chrono::milliseconds file_update_interval{std::chrono::minutes{5}};
21
22 /// Network query timeout
23 std::chrono::milliseconds network_timeout{std::chrono::seconds{1}};
24
25 /// Network query attempts
27
28 /// Custom name servers list (system-wide resolvers used if empty)
30
31 /// Network cache ways
33
34 /// Network cache size per way
36
37 /// Network cache upper reply TTL limit
38 std::chrono::milliseconds cache_max_reply_ttl{std::chrono::minutes{5}};
39
40 /// Network cache failure TTL
41 std::chrono::milliseconds cache_failure_ttl{std::chrono::seconds{5}};
42};
43
44} // namespace clients::dns
45
46USERVER_NAMESPACE_END