ZeroTierOne/nonfree/controller/ControllerConfig.hpp
Grant Limberg 6113bad61e
Some checks failed
/ build_macos (push) Has been cancelled
/ build_windows (push) Has been cancelled
/ Central Controller Build (push) Has been cancelled
/ build_ubuntu (push) Has been cancelled
/ multi-arch-docker (push) Has been cancelled
make pubsub topics configurable
Also for pubsub trips back to CV1/CV2, rather than having 2 queues for each service (networks & members), theres now only a single queue for each change type, and `frontend = (cv1|cv2)` attribute is set on the message for filtering.
2025-09-18 09:33:04 -07:00

60 lines
No EOL
1.1 KiB
C++

#ifndef CONTROLLER_CONFIG_HPP
#define CONTROLLER_CONFIG_HPP
#include "Redis.hpp"
#include <string>
namespace ZeroTier {
struct PubSubConfig {
std::string project_id;
std::string member_change_recv_topic;
std::string member_change_send_topic;
std::string network_change_recv_topic;
std::string network_change_send_topic;
};
struct BigTableConfig {
std::string project_id;
std::string instance_id;
std::string table_id;
};
struct ControllerConfig {
bool ssoEnabled;
std::string listenMode;
std::string statusMode;
RedisConfig* redisConfig;
PubSubConfig* pubSubConfig;
BigTableConfig* bigTableConfig;
ControllerConfig()
: ssoEnabled(false)
, listenMode("")
, statusMode("")
, redisConfig(nullptr)
, pubSubConfig(nullptr)
, bigTableConfig(nullptr)
{
}
~ControllerConfig()
{
if (redisConfig) {
delete redisConfig;
redisConfig = nullptr;
}
if (pubSubConfig) {
delete pubSubConfig;
pubSubConfig = nullptr;
}
if (bigTableConfig) {
delete bigTableConfig;
bigTableConfig = nullptr;
}
}
};
} // namespace ZeroTier
#endif // CONTROLLER_CONFIG_HPP