MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / getHeartbeatNodes

Method getHeartbeatNodes

libminifi/src/c2/C2Client.cpp:301–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301std::vector<std::shared_ptr<state::response::ResponseNode>> C2Client::getHeartbeatNodes(bool include_manifest) const {
302 std::string fullHb{"true"};
303 configuration_->get("nifi.c2.full.heartbeat", fullHb);
304 const bool include = include_manifest || fullHb == "true";
305
306 std::vector<std::shared_ptr<state::response::ResponseNode>> nodes;
307 std::lock_guard<std::mutex> lock(metrics_mutex_);
308 for (const auto &entry : root_response_nodes_) {
309 auto identifier = std::dynamic_pointer_cast<state::response::AgentIdentifier>(entry.second);
310 if (identifier) {
311 identifier->includeAgentManifest(include);
312 }
313 nodes.push_back(entry.second);
314 }
315 return nodes;
316}
317
318} // namespace c2
319} // namespace minifi

Callers 1

performHeartBeatMethod · 0.80

Calls 2

includeAgentManifestMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected