aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/dns/cache.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/dns/cache.h
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/dns/cache.h')
-rw-r--r--library/cpp/dns/cache.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/library/cpp/dns/cache.h b/library/cpp/dns/cache.h
index a49ffb972f..eda5dc4070 100644
--- a/library/cpp/dns/cache.h
+++ b/library/cpp/dns/cache.h
@@ -1,34 +1,34 @@
-#pragma once
-
-#include <util/network/socket.h>
-#include <util/generic/strbuf.h>
+#pragma once
+
+#include <util/network/socket.h>
+#include <util/generic/strbuf.h>
#include <util/generic/string.h>
-
+
namespace NDns {
- struct TResolveInfo {
- inline TResolveInfo(const TStringBuf& host, ui16 port)
- : Host(host)
- , Port(port)
- {
- }
-
- TStringBuf Host;
- ui16 Port;
- };
-
- struct TResolvedHost {
+ struct TResolveInfo {
+ inline TResolveInfo(const TStringBuf& host, ui16 port)
+ : Host(host)
+ , Port(port)
+ {
+ }
+
+ TStringBuf Host;
+ ui16 Port;
+ };
+
+ struct TResolvedHost {
inline TResolvedHost(const TString& host, const TNetworkAddress& addr) noexcept
: Host(host)
, Addr(addr)
, Id(0)
- {
- }
-
+ {
+ }
+
TString Host; //resolved hostname (from TResolveInfo, - before aliasing)
- TNetworkAddress Addr;
+ TNetworkAddress Addr;
size_t Id; //cache record id
- };
-
+ };
+
// Resolving order:
// 1. check local thread cache, return if found
// 2. check global cache, return if found
@@ -42,4 +42,4 @@ namespace NDns {
//create alias for host, which can be used for static resolving (when alias is ip address)
void AddHostAlias(const TString& host, const TString& alias);
-}
+}