Abstract out change listener from controller itself to permit DBs to shadow changes from other DBs.
This commit is contained in:
@@ -51,7 +51,7 @@ struct MQConfig;
|
||||
class PostgreSQL : public DB
|
||||
{
|
||||
public:
|
||||
PostgreSQL(EmbeddedNetworkController *const nc, const Identity &myId, const char *path, int listenPort, MQConfig *mqc = NULL);
|
||||
PostgreSQL(const Identity &myId, const char *path, int listenPort, MQConfig *mqc = NULL);
|
||||
virtual ~PostgreSQL();
|
||||
|
||||
virtual bool waitForReady();
|
||||
@@ -78,7 +78,6 @@ private:
|
||||
void _networksWatcher_Postgres(PGconn *conn);
|
||||
void _networksWatcher_RabbitMQ();
|
||||
|
||||
|
||||
void commitThread();
|
||||
void onlineNotificationThread();
|
||||
|
||||
@@ -93,7 +92,6 @@ private:
|
||||
|
||||
BlockingQueue<nlohmann::json *> _commitQueue;
|
||||
|
||||
|
||||
std::thread _heartbeatThread;
|
||||
std::thread _membersDbWatcher;
|
||||
std::thread _networksDbWatcher;
|
||||
@@ -116,4 +114,4 @@ private:
|
||||
|
||||
#endif // ZT_CONTROLLER_LIBPQ_HPP
|
||||
|
||||
#endif // ZT_CONTROLLER_USE_LIBPQ
|
||||
#endif // ZT_CONTROLLER_USE_LIBPQ
|
||||
|
||||
Reference in New Issue
Block a user