aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authoralexvru <alexvru@ydb.tech>2023-08-08 18:28:56 +0300
committeralexvru <alexvru@ydb.tech>2023-08-08 19:29:08 +0300
commit3875d4ea30a3307f4ce47d4a01c131f00c100468 (patch)
treed74a210f6e4ed382c060b95110ad4ab9dd1a7368 /library/cpp
parent3fde6ea974a169d992c9f63a7bcc07e0903760cd (diff)
downloadydb-3875d4ea30a3307f4ce47d4a01c131f00c100468.tar.gz
Support static node list change subscriptions in Dynamic Nameservice and use them in BSC KIKIMR-13309
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/actors/core/interconnect.h7
-rw-r--r--library/cpp/actors/interconnect/interconnect.h9
2 files changed, 16 insertions, 0 deletions
diff --git a/library/cpp/actors/core/interconnect.h b/library/cpp/actors/core/interconnect.h
index 37fd7bff4d3..dd6509f7271 100644
--- a/library/cpp/actors/core/interconnect.h
+++ b/library/cpp/actors/core/interconnect.h
@@ -179,6 +179,13 @@ namespace NActors {
struct TEvRegisterNodeResult;
struct TEvListNodes: public TEventLocal<TEvListNodes, EvListNodes> {
+ const bool SubscribeToStaticNodeChanges = false;
+
+ TEvListNodes() = default;
+
+ TEvListNodes(bool subscribeToStaticNodeChanges)
+ : SubscribeToStaticNodeChanges(subscribeToStaticNodeChanges)
+ {}
};
struct TNodeInfo {
diff --git a/library/cpp/actors/interconnect/interconnect.h b/library/cpp/actors/interconnect/interconnect.h
index a8a646dd182..38d8cd47817 100644
--- a/library/cpp/actors/interconnect/interconnect.h
+++ b/library/cpp/actors/interconnect/interconnect.h
@@ -111,6 +111,15 @@ namespace NActors {
Location = ni.Location;
return *this;
}
+
+ friend bool operator ==(const TNodeInfo& x, const TNodeInfo& y) {
+ return x.Address == y.Address && x.Host == y.Host && x.ResolveHost == y.ResolveHost && x.Port == y.Port
+ && x.Location == y.Location;
+ }
+
+ friend bool operator !=(const TNodeInfo& x, const TNodeInfo& y) {
+ return !(x == y);
+ }
};
TMap<ui32, TNodeInfo> StaticNodeTable;