|
18 | 18 | #include <fstream>
|
19 | 19 | #include <iostream>
|
20 | 20 | #include <ixbots/IXCobraMetricsToRedisBot.h>
|
| 21 | +#include <ixbots/IXCobraToCobraBot.h> |
21 | 22 | #include <ixbots/IXCobraToPythonBot.h>
|
22 | 23 | #include <ixbots/IXCobraToSentryBot.h>
|
23 | 24 | #include <ixbots/IXCobraToStatsdBot.h>
|
@@ -2813,6 +2814,8 @@ int main(int argc, char** argv)
|
2813 | 2814 | std::string logfile;
|
2814 | 2815 | std::string moduleName;
|
2815 | 2816 | std::string republishChannel;
|
| 2817 | + std::string publisherRolename; |
| 2818 | + std::string publisherRolesecret; |
2816 | 2819 | std::string sendMsg("hello world");
|
2817 | 2820 | ix::SocketTLSOptions tlsOptions;
|
2818 | 2821 | ix::CobraConfig cobraConfig;
|
@@ -3077,6 +3080,17 @@ int main(int argc, char** argv)
|
3077 | 3080 | addTLSOptions(cobra2statsd);
|
3078 | 3081 | addCobraBotConfig(cobra2statsd);
|
3079 | 3082 |
|
| 3083 | + CLI::App* cobra2cobra = app.add_subcommand("cobra_to_cobra", "Cobra to Cobra"); |
| 3084 | + cobra2cobra->fallthrough(); |
| 3085 | + cobra2cobra->add_option("--republish", republishChannel, "Republish channel"); |
| 3086 | + cobra2cobra->add_option("--publisher_rolename", publisherRolename, "Publisher Role name") |
| 3087 | + ->required(); |
| 3088 | + cobra2cobra->add_option("--publisher_rolesecret", publisherRolesecret, "Publisher Role secret") |
| 3089 | + ->required(); |
| 3090 | + cobra2cobra->add_flag("-q", quiet, "Quiet"); |
| 3091 | + addTLSOptions(cobra2cobra); |
| 3092 | + addCobraBotConfig(cobra2cobra); |
| 3093 | + |
3080 | 3094 | CLI::App* cobra2python = app.add_subcommand("cobra_to_python", "Cobra to python");
|
3081 | 3095 | cobra2python->fallthrough();
|
3082 | 3096 | cobra2python->add_option("--host", hostname, "Statsd host");
|
@@ -3408,6 +3422,11 @@ int main(int argc, char** argv)
|
3408 | 3422 | ret = (int) ix::cobra_metrics_to_redis_bot(cobraBotConfig, redisClient, verbose);
|
3409 | 3423 | }
|
3410 | 3424 | }
|
| 3425 | + else if (app.got_subcommand("cobra_to_cobra")) |
| 3426 | + { |
| 3427 | + ret = (int) ix::cobra_to_cobra_bot( |
| 3428 | + cobraBotConfig, republishChannel, publisherRolename, publisherRolesecret); |
| 3429 | + } |
3411 | 3430 | else if (app.got_subcommand("snake"))
|
3412 | 3431 | {
|
3413 | 3432 | ret = ix::ws_snake_main(port,
|
|
0 commit comments