MCPcopy Create free account
hub / github.com/Icinga/icinga2 / FindTargets

Method FindTargets

lib/remote/statushandler.cpp:20–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18 DECLARE_PTR_TYPEDEFS(StatusTargetProvider);
19
20 void FindTargets([[maybe_unused]] const String& type,
21 const std::function<void (const Value&)>& addTarget) const override
22 {
23 Namespace::Ptr statsFunctions = ScriptGlobal::Get("StatsFunctions", &Empty);
24
25 if (statsFunctions) {
26 ObjectLock olock(statsFunctions);
27
28 for (const Namespace::Pair& kv : statsFunctions)
29 addTarget(GetTargetByName("Status", kv.first));
30 }
31 }
32
33 Value GetTargetByName([[maybe_unused]] const String& type, const String& name) const override
34 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected