back to plain old libpq in dev

This commit is contained in:
Grant Limberg 2018-11-30 10:37:27 -08:00
parent 9d2bc9bf4e
commit ccb856749f
4 changed files with 855 additions and 486 deletions

View file

@ -23,16 +23,12 @@
#include "DB.hpp"
#include <pqxx/pqxx>
extern "C" {
typedef struct pg_conn PGconn;
}
namespace ZeroTier
{
class _MemberNotificationReceiver;
class _NetworkNotificationReceiver;
/**
* A controller database driver that talks to PostgreSQL
@ -60,8 +56,8 @@ protected:
};
private:
void initializeNetworks(pqxx::connection &conn);
void initializeMembers(pqxx::connection &conn);
void initializeNetworks(PGconn *conn);
void initializeMembers(PGconn *conn);
void heartbeat();
void membersDbWatcher();
void networksDbWatcher();
@ -85,9 +81,6 @@ private:
mutable std::mutex _readyLock;
std::atomic<int> _ready, _connected, _run;
mutable volatile bool _waitNoticePrinted;
friend class _MemberNotificationReceiver;
friend class _NetworkNotificationReceiver;
};
}