chore: rebrand backone names, add lint gate + agent docs
- CI: build/validate use backone selftest + binary names, add lint.yml - make-*.mk: emit/install backone binaries, drop zerotier-one paths - doc/debian/ext.installfiles: backone manpages, service, init, te - rule-compiler: npm test runs test.js; attic world planet files - AGENTS.md repository guidelines, tools/lint.sh changed-lines gate - gitignore: /backone-selftest, *.gcno, *.gcda
This commit is contained in:
1 parent
104d781614
commit
c550fe0684
37 files changed
+881
-565
No files matched your search
+13
-2
@@ -380,12 +380,23 @@ bool LFDB::save(nlohmann::json &record,bool notifyListeners)
|
||||
|
||||
void LFDB::eraseNetwork(const uint64_t networkId)
|
||||
{
|
||||
// TODO
|
||||
nlohmann::json network, nullJson;
|
||||
get(networkId, network);
|
||||
_networkChanged(network, nullJson, true);
|
||||
std::lock_guard<std::mutex> l(_state_l);
|
||||
_state.erase(networkId);
|
||||
}
|
||||
|
||||
void LFDB::eraseMember(const uint64_t networkId,const uint64_t memberId)
|
||||
{
|
||||
// TODO
|
||||
nlohmann::json network, member, nullJson;
|
||||
get(networkId, network, memberId, member);
|
||||
_memberChanged(member, nullJson, true);
|
||||
std::lock_guard<std::mutex> l(_state_l);
|
||||
auto nw = _state.find(networkId);
|
||||
if (nw != _state.end()) {
|
||||
nw->second.members.erase(memberId);
|
||||
}
|
||||
}
|
||||
|
||||
void LFDB::nodeIsOnline(const uint64_t networkId,const uint64_t memberId,const InetAddress &physicalAddress)
|
||||
|
||||
@@ -199,8 +199,13 @@ PostgreSQL::PostgreSQL(const Identity &myId, const char *path, int listenPort, R
|
||||
}
|
||||
const char *redisMemberStatus = getenv("ZT_REDIS_MEMBER_STATUS");
|
||||
if (redisMemberStatus && (strcmp(redisMemberStatus, "true") == 0)) {
|
||||
_redisMemberStatus = true;
|
||||
fprintf(stderr, "Using redis for member status\n");
|
||||
if (_rc != NULL) {
|
||||
_redisMemberStatus = true;
|
||||
fprintf(stderr, "Using redis for member status\n");
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "ZT_REDIS_MEMBER_STATUS=true ignored: no settings.redis config\n");
|
||||
}
|
||||
}
|
||||
|
||||
auto c = _pool->borrow();
|
||||
@@ -222,7 +227,7 @@ PostgreSQL::PostgreSQL(const Identity &myId, const char *path, int listenPort, R
|
||||
opts.host = _rc->hostname;
|
||||
opts.port = _rc->port;
|
||||
opts.password = _rc->password;
|
||||
opts.db = 0;
|
||||
opts.db = _rc->clusterMode ? 0 : _rc->db;
|
||||
opts.keep_alive = true;
|
||||
opts.connect_timeout = std::chrono::seconds(3);
|
||||
poolOpts.size = 25;
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
|
||||
namespace ZeroTier {
|
||||
struct RedisConfig {
|
||||
std::string hostname;
|
||||
int port;
|
||||
std::string password;
|
||||
bool clusterMode;
|
||||
std::string hostname;
|
||||
int port;
|
||||
std::string password;
|
||||
bool clusterMode;
|
||||
int db;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user