mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 21:55:03 +02:00
parent
9b05304435
commit
2a9ac26338
@ -57,14 +57,6 @@ void Endpoint::OnAllConfigLoaded(void)
|
|||||||
BOOST_THROW_EXCEPTION(ScriptError("Endpoint '" + GetName() + "' does not belong to a zone.", GetDebugInfo()));
|
BOOST_THROW_EXCEPTION(ScriptError("Endpoint '" + GetName() + "' does not belong to a zone.", GetDebugInfo()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Endpoint::ValidatePort(const String& value, const ValidationUtils& utils)
|
|
||||||
{
|
|
||||||
ObjectImpl<Endpoint>::ValidatePort(value, utils);
|
|
||||||
|
|
||||||
if (value.IsEmpty())
|
|
||||||
BOOST_THROW_EXCEPTION(ValidationError(this, boost::assign::list_of("enpoint_port"), "Port may not be empty."));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Endpoint::AddClient(const JsonRpcConnection::Ptr& client)
|
void Endpoint::AddClient(const JsonRpcConnection::Ptr& client)
|
||||||
{
|
{
|
||||||
bool was_master = ApiListener::GetInstance()->IsMaster();
|
bool was_master = ApiListener::GetInstance()->IsMaster();
|
||||||
|
@ -56,7 +56,6 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void OnAllConfigLoaded(void) override;
|
virtual void OnAllConfigLoaded(void) override;
|
||||||
virtual void ValidatePort(const String& value, const ValidationUtils& utils) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mutable boost::mutex m_ClientsLock;
|
mutable boost::mutex m_ClientsLock;
|
||||||
|
@ -27,7 +27,7 @@ namespace icinga
|
|||||||
class Endpoint : ConfigObject
|
class Endpoint : ConfigObject
|
||||||
{
|
{
|
||||||
[config] String host;
|
[config] String host;
|
||||||
[config] String port {
|
[config, required] String port {
|
||||||
default {{{ return "5665"; }}}
|
default {{{ return "5665"; }}}
|
||||||
};
|
};
|
||||||
[config] double log_duration {
|
[config] double log_duration {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user