mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-12-15 14:51:08 -08:00
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.
This commit is contained in:
parent
cb2de5aae1
commit
6113bad61e
10 changed files with 74 additions and 50 deletions
|
|
@ -1822,6 +1822,14 @@ class OneServiceImpl : public OneService {
|
|||
json& ps = cc["pubsub"];
|
||||
_controllerConfig.pubSubConfig = new PubSubConfig();
|
||||
_controllerConfig.pubSubConfig->project_id = OSUtils::jsonString(ps["project_id"], "");
|
||||
_controllerConfig.pubSubConfig->member_change_recv_topic =
|
||||
OSUtils::jsonString(ps["member_change_recv_topic"], "");
|
||||
_controllerConfig.pubSubConfig->member_change_send_topic =
|
||||
OSUtils::jsonString(ps["member_change_send_topic"], "");
|
||||
_controllerConfig.pubSubConfig->network_change_recv_topic =
|
||||
OSUtils::jsonString(ps["network_change_recv_topic"], "");
|
||||
_controllerConfig.pubSubConfig->network_change_send_topic =
|
||||
OSUtils::jsonString(ps["network_change_send_topic"], "");
|
||||
}
|
||||
if (_controllerConfig.listenMode == "pubsub" && ! _controllerConfig.pubSubConfig) {
|
||||
fprintf(stderr, "ERROR: pubsub listenMode requires pubsub configuration in local.conf" ZT_EOL_S);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue