mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 08:04:14 +02:00
Moved OnCheckResultReceived signal to the Service class.
This commit is contained in:
parent
61e381befc
commit
a1a3cb7d0f
@ -22,7 +22,6 @@
|
|||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
RingBuffer CIB::m_TaskStatistics(15 * 60);
|
RingBuffer CIB::m_TaskStatistics(15 * 60);
|
||||||
boost::signal<void (const CheckResultMessage&)> CIB::OnCheckResultReceived;
|
|
||||||
|
|
||||||
void CIB::UpdateTaskStatistics(long tv, int num)
|
void CIB::UpdateTaskStatistics(long tv, int num)
|
||||||
{
|
{
|
||||||
|
@ -29,8 +29,6 @@ public:
|
|||||||
static void UpdateTaskStatistics(long tv, int num);
|
static void UpdateTaskStatistics(long tv, int num);
|
||||||
static int GetTaskStatistics(long timespan);
|
static int GetTaskStatistics(long timespan);
|
||||||
|
|
||||||
static boost::signal<void (const CheckResultMessage&)> OnCheckResultReceived;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static RingBuffer m_TaskStatistics;
|
static RingBuffer m_TaskStatistics;
|
||||||
};
|
};
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
|
boost::signal<void (Service, const CheckResultMessage&)> Service::OnCheckResultReceived;
|
||||||
|
|
||||||
Service::Service(const ConfigObject::Ptr& configObject)
|
Service::Service(const ConfigObject::Ptr& configObject)
|
||||||
: ConfigObjectAdapter(configObject)
|
: ConfigObjectAdapter(configObject)
|
||||||
{
|
{
|
||||||
|
@ -39,6 +39,7 @@ enum ServiceStateType
|
|||||||
};
|
};
|
||||||
|
|
||||||
class CheckResult;
|
class CheckResult;
|
||||||
|
class CheckResultMessage;
|
||||||
class ServiceStatusMessage;
|
class ServiceStatusMessage;
|
||||||
|
|
||||||
class I2_CIB_API Service : public ConfigObjectAdapter
|
class I2_CIB_API Service : public ConfigObjectAdapter
|
||||||
@ -103,6 +104,8 @@ public:
|
|||||||
static string StateTypeToString(ServiceStateType state);
|
static string StateTypeToString(ServiceStateType state);
|
||||||
|
|
||||||
static Dictionary::Ptr ResolveDependencies(Host host, const Dictionary::Ptr& dependencies);
|
static Dictionary::Ptr ResolveDependencies(Host host, const Dictionary::Ptr& dependencies);
|
||||||
|
|
||||||
|
static boost::signal<void (Service service, const CheckResultMessage&)> OnCheckResultReceived;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ void CIBSyncComponent::CheckResultRequestHandler(const Endpoint::Ptr& sender, co
|
|||||||
if (!params.GetCheckResult(&cr))
|
if (!params.GetCheckResult(&cr))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CIB::OnCheckResultReceived(params);
|
Service::OnCheckResultReceived(service, params);
|
||||||
service.ApplyCheckResult(cr);
|
service.ApplyCheckResult(cr);
|
||||||
|
|
||||||
time_t now = Utility::GetTime();
|
time_t now = Utility::GetTime();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user