diff options
Diffstat (limited to 'controller/PostgreSQL.hpp')
-rw-r--r-- | controller/PostgreSQL.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/controller/PostgreSQL.hpp b/controller/PostgreSQL.hpp index 7932317b..779d47bd 100644 --- a/controller/PostgreSQL.hpp +++ b/controller/PostgreSQL.hpp @@ -40,6 +40,8 @@ extern "C" { namespace ZeroTier { +struct MQConfig; + /** * A controller database driver that talks to PostgreSQL * @@ -49,7 +51,7 @@ namespace ZeroTier class PostgreSQL : public DB { public: - PostgreSQL(EmbeddedNetworkController *const nc, const Identity &myId, const char *path, int listenPort); + PostgreSQL(EmbeddedNetworkController *const nc, const Identity &myId, const char *path, int listenPort, MQConfig *mqc = NULL); virtual ~PostgreSQL(); virtual bool waitForReady(); @@ -70,7 +72,13 @@ private: void initializeMembers(PGconn *conn); void heartbeat(); void membersDbWatcher(); + void _membersWatcher_Postgres(PGconn *conn); + void _membersWatcher_RabbitMQ(); void networksDbWatcher(); + void _networksWatcher_Postgres(PGconn *conn); + void _networksWatcher_RabbitMQ(); + + void commitThread(); void onlineNotificationThread(); @@ -100,6 +108,8 @@ private: mutable volatile bool _waitNoticePrinted; int _listenPort; + + MQConfig *_mqc; }; } |