MXS-1775 Change MonitorInstance::configure() prototype
Now return boolean, to allow derived class to signal a failure to configure.
This commit is contained in:
@ -130,7 +130,7 @@ json_t* GaleraMonitor::diagnostics_json() const
|
||||
return rval;
|
||||
}
|
||||
|
||||
void GaleraMonitor::configure(const MXS_CONFIG_PARAMETER* params)
|
||||
bool GaleraMonitor::configure(const MXS_CONFIG_PARAMETER* params)
|
||||
{
|
||||
m_disableMasterFailback = config_get_bool(params, "disable_master_failback");
|
||||
m_availableWhenDonor = config_get_bool(params, "available_when_donor");
|
||||
@ -142,6 +142,8 @@ void GaleraMonitor::configure(const MXS_CONFIG_PARAMETER* params)
|
||||
|
||||
/* Reset all data in the hashtable */
|
||||
reset_cluster_info();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GaleraMonitor::has_sufficient_permissions() const
|
||||
|
||||
@ -64,7 +64,7 @@ public:
|
||||
json_t* diagnostics_json() const;
|
||||
|
||||
protected:
|
||||
void configure(const MXS_CONFIG_PARAMETER* param);
|
||||
bool configure(const MXS_CONFIG_PARAMETER* param);
|
||||
bool has_sufficient_permissions() const;
|
||||
void update_server_status(MXS_MONITORED_SERVER* monitored_server);
|
||||
void tick();
|
||||
|
||||
Reference in New Issue
Block a user