mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2026-04-30 16:54:06 -07:00
reorganize rustybits into a single library with smeeclient behind the ztcontroller feature flag
This commit is contained in:
parent
a548c7ea71
commit
e822811f29
22 changed files with 3491 additions and 492 deletions
|
|
@ -27,7 +27,7 @@
|
|||
#include <climits>
|
||||
#include <iomanip>
|
||||
#include <libpq-fe.h>
|
||||
#include <smeeclient.h>
|
||||
#include <rustybits.h>
|
||||
#include <sstream>
|
||||
|
||||
// #define REDIS_TRACE 1
|
||||
|
|
@ -153,7 +153,7 @@ CV1::CV1(const Identity& myId, const char* path, int listenPort, RedisConfig* rc
|
|||
CV1::~CV1()
|
||||
{
|
||||
if (_smee != NULL) {
|
||||
smeeclient::smee_client_delete(_smee);
|
||||
rustybits::smee_client_delete(_smee);
|
||||
_smee = NULL;
|
||||
}
|
||||
|
||||
|
|
@ -195,7 +195,7 @@ void CV1::configureSmee()
|
|||
if (scheme != NULL && host != NULL && port != NULL && ns != NULL && task_queue != NULL) {
|
||||
fprintf(stderr, "creating smee client\n");
|
||||
std::string hostPort = std::string(scheme) + std::string("://") + std::string(host) + std::string(":") + std::string(port);
|
||||
this->_smee = smeeclient::smee_client_new(hostPort.c_str(), ns, task_queue);
|
||||
this->_smee = rustybits::smee_client_new(hostPort.c_str(), ns, task_queue);
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "Smee client not configured\n");
|
||||
|
|
@ -1850,7 +1850,7 @@ void CV1::notifyNewMember(const std::string& networkID, const std::string& membe
|
|||
auto span = tracer->StartSpan("cv1::notifyNewMember");
|
||||
auto scope = tracer->WithActiveSpan(span);
|
||||
|
||||
smeeclient::smee_client_notify_network_joined(_smee, networkID.c_str(), memberID.c_str());
|
||||
rustybits::smee_client_notify_network_joined(_smee, networkID.c_str(), memberID.c_str());
|
||||
}
|
||||
|
||||
void CV1::onlineNotificationThread()
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include <pqxx/pqxx>
|
||||
#include <redis++/redis++.h>
|
||||
|
||||
namespace smeeclient {
|
||||
namespace rustybits {
|
||||
struct SmeeClient;
|
||||
}
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ class CV1 : public DB {
|
|||
std::shared_ptr<sw::redis::RedisCluster> _cluster;
|
||||
bool _redisMemberStatus;
|
||||
|
||||
smeeclient::SmeeClient* _smee;
|
||||
rustybits::SmeeClient* _smee;
|
||||
};
|
||||
|
||||
} // namespace ZeroTier
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue