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

Method FindTargets

lib/remote/filterutility.cpp:150–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150void ConfigObjectTargetProvider::FindTargets(const String& type, const std::function<void (const Value&)>& addTarget) const
151{
152 Type::Ptr ptype = Type::GetByName(type);
153 auto *ctype = dynamic_cast<ConfigType *>(ptype.get());
154
155 if (ctype) {
156 for (const ConfigObject::Ptr& object : ctype->GetObjects()) {
157 addTarget(object);
158 }
159 }
160}
161
162Value ConfigObjectTargetProvider::GetTargetByName(const String& type, const String& name) const
163{

Callers 1

GetFilterTargetsMethod · 0.45

Calls 2

getMethod · 0.45
GetObjectsMethod · 0.45

Tested by

no test coverage detected