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

Function GetRedisCustomVarKey

lib/icingadb/icingadb-objects.cpp:583–592  ·  view source on GitHub ↗

* Gets the Redis key for the custom variables of a given type. * * @param type The type for which to get the custom variable Redis key. * @return The corresponding customvar Redis key for the given type, or an empty string if the type does not have one. */

Source from the content-addressed store, hash-verified

581 * @return The corresponding customvar Redis key for the given type, or an empty string if the type does not have one.
582 */
583static RedisConnection::QueryArg GetRedisCustomVarKey(const Type::Ptr& type)
584{
585 auto it = std::find_if(std::begin(l_CustomVarKeys), std::end(l_CustomVarKeys), [&type](const auto& pair) {
586 return pair.first == type;
587 });
588 if (it != std::end(l_CustomVarKeys)) {
589 return it->second;
590 }
591 return {""};
592}
593
594std::vector<RedisConnection::QueryArg> IcingaDB::GetTypeOverwriteKeys(const Type::Ptr& type, bool skipChecksums)
595{

Callers 3

GetTypeOverwriteKeysMethod · 0.85
SendCustomVarsChangedMethod · 0.85

Calls 2

beginFunction · 0.85
endFunction · 0.85

Tested by

no test coverage detected