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

File diff suppressed because it is too large Load Diff

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;
};
}

View File

@ -319,7 +319,7 @@ official: FORCE
make -j4 ZT_OFFICIAL=1 all
central-controller: FORCE
make -j4 LDLIBS="-L/usr/pgsql-10/lib/ -lpqxx -lpq" CXXFLAGS="-I/usr/pgsql-10/include -fPIC" DEFS="-DZT_CONTROLLER_USE_LIBPQ" ZT_OFFICIAL=1 ZT_USE_X64_ASM_ED25519=1 one
make -j4 LDLIBS="-L/usr/pgsql-10/lib/ -lpq" CXXFLAGS="-I/usr/pgsql-10/include -fPIC" DEFS="-DZT_CONTROLLER_USE_LIBPQ" ZT_OFFICIAL=1 ZT_USE_X64_ASM_ED25519=1 one
central-controller-docker: central-controller
docker build -t gcr.io/zerotier-central/ztcentral-controller:${TIMESTAMP} -f docker/Dockerfile .

View File

@ -8,7 +8,7 @@ fi
TAG=$1
CONTROLLERS=( 12ac4a1e71 159924d630 17d709436c 1c33c1ced0 1d71939404 1d71939404 565799d8f6 6ab565387a 8056c2e21c 8850338390 8bd5124fd6 93afae5963 9bee8941b5 9f77fc393e a09acf0233 a84ac5c10a abfd31bd47 af78bf9436 c7c8172af1 d5e5fb6537 e4da7455b2 e5cd7a9e1c ea9349aa9c )
CONTROLLERS=`kubectl get pods -o=name | grep controller | sed "s/^.\{4\}//" | cut -d '-' -f 2`
for c in ${CONTROLLERS[@]}
do