MXS-2424 Refactor for further changes

In subsequent change(s) persisted node information will be used
as a last resort to connect to a Clustrix node.
This commit is contained in:
Johan Wikman
2019-04-05 16:08:09 +03:00
parent 875146f53c
commit c422aafe1d
4 changed files with 71 additions and 51 deletions

View File

@ -14,6 +14,7 @@
#include "clustrixmon.hh"
#include <map>
#include <set>
#include <sqlite3.h>
#include <maxscale/monitor.hh>
#include <maxbase/http.hh>
@ -87,6 +88,11 @@ private:
void check_cluster(Clustrix::Softfailed softfailed);
void check_hub(Clustrix::Softfailed softfailed);
void choose_hub(Clustrix::Softfailed softfailed);
bool choose_dynamic_hub(Clustrix::Softfailed softfailed, std::set<std::string>& ips_checked);
bool choose_bootstrap_hub(Clustrix::Softfailed softfailed, std::set<std::string>& ips_checked);
bool choose_persisted_hub(Clustrix::Softfailed softfailed, std::set<std::string>& ips_checked);
void refresh_nodes();
bool check_cluster_membership(std::map<int, ClustrixMembership>* pMemberships);