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

Method CustomVariablesAccessor

lib/livestatus/statustable.cpp:253–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253Value StatusTable::CustomVariablesAccessor(const Value&)
254{
255 Dictionary::Ptr vars = IcingaApplication::GetInstance()->GetVars();
256
257 ArrayData result;
258
259 if (vars) {
260 ObjectLock olock(vars);
261 for (const auto& kv : vars) {
262 result.push_back(new Array({
263 kv.first,
264 kv.second
265 }));
266 }
267 }
268
269 return new Array(std::move(result));
270}

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected