feat: set labels in NodeContext/Info
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user