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

Method FetchRows

lib/livestatus/hoststable.cpp:172–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172void HostsTable::FetchRows(const AddRowFunction& addRowFn)
173{
174 if (GetGroupByType() == LivestatusGroupByHostGroup) {
175 for (const HostGroup::Ptr& hg : ConfigType::GetObjectsByType<HostGroup>()) {
176 for (const Host::Ptr& host : hg->GetMembers()) {
177 /* the caller must know which groupby type and value are set for this row */
178 if (!addRowFn(host, LivestatusGroupByHostGroup, hg))
179 return;
180 }
181 }
182 } else {
183 for (const Host::Ptr& host : ConfigType::GetObjectsByType<Host>()) {
184 if (!addRowFn(host, LivestatusGroupByNone, Empty))
185 return;
186 }
187 }
188}
189
190Object::Ptr HostsTable::HostGroupAccessor(LivestatusGroupByType groupByType, const Object::Ptr& groupByObject)
191{

Callers

nothing calls this directly

Calls 1

GetMembersMethod · 0.45

Tested by

no test coverage detected