feat: set labels in NodeContext/Info

This commit is contained in:
2025-08-29 20:21:11 +02:00
parent d3a9802ec9
commit fe045804cb
7 changed files with 61 additions and 42 deletions

View File

@@ -4,6 +4,16 @@ NodeContext::NodeContext() {
udp = new WiFiUDP();
memberList = new std::map<String, NodeInfo>();
hostname = "";
self.hostname = "";
self.ip = IPAddress();
self.lastSeen = 0;
self.status = NodeInfo::INACTIVE;
}
NodeContext::NodeContext(std::initializer_list<std::pair<String, String>> initialLabels) : NodeContext() {
for (const auto& kv : initialLabels) {
self.labels[kv.first] = kv.second;
}
}
NodeContext::~NodeContext() {