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

Function GetDependencyGroupKey

lib/icinga/checkable-dependency.cpp:52–59  ·  view source on GitHub ↗

* Get the key for the provided dependency group. * * The key is either the parent Checkable object or the redundancy group name of the dependency object. * This is used to uniquely identify the dependency group within a given Checkable object. * * @param dependency The dependency to get the key for. * * @return - Returns the key for the provided dependency group. */

Source from the content-addressed store, hash-verified

50 * @return - Returns the key for the provided dependency group.
51 */
52static std::variant<Checkable*, String> GetDependencyGroupKey(const Dependency::Ptr& dependency)
53{
54 if (auto redundancyGroup(dependency->GetRedundancyGroup()); !redundancyGroup.IsEmpty()) {
55 return redundancyGroup;
56 }
57
58 return dependency->GetParent().get();
59}
60
61/**
62 * Add the provided dependency to the current Checkable list of dependencies.

Callers 2

AddDependencyMethod · 0.85
RemoveDependencyMethod · 0.85

Calls 3

IsEmptyMethod · 0.45
getMethod · 0.45
GetParentMethod · 0.45

Tested by

no test coverage detected