cobra to statsd bot ported to windows + add unittest
This commit is contained in:
@ -21,16 +21,11 @@ option(USE_TLS "Add TLS support" ON)
|
||||
include_directories(ws .)
|
||||
include_directories(ws ..)
|
||||
include_directories(ws ../third_party)
|
||||
include_directories(ws ../third_party/statsd-client-cpp/src)
|
||||
include_directories(ws ../third_party/spdlog/include)
|
||||
include_directories(ws ../third_party/cpp-linenoise)
|
||||
|
||||
add_definitions(-DSPDLOG_COMPILED_LIB=1)
|
||||
|
||||
if (UNIX)
|
||||
set( STATSD_CLIENT_SOURCES ../third_party/statsd-client-cpp/src/statsd_client.cpp)
|
||||
endif()
|
||||
|
||||
find_package(JsonCpp)
|
||||
if (NOT JSONCPP_FOUND)
|
||||
include_directories(../third_party/jsoncpp)
|
||||
@ -39,7 +34,6 @@ endif()
|
||||
|
||||
add_executable(ws
|
||||
../third_party/msgpack11/msgpack11.cpp
|
||||
${STATSD_CLIENT_SOURCES}
|
||||
${JSONCPP_SOURCES}
|
||||
|
||||
ws_http_client.cpp
|
||||
|
19
ws/ws.cpp
19
ws/ws.cpp
@ -269,6 +269,9 @@ int main(int argc, char** argv)
|
||||
cobra2statsd->add_option("--pidfile", pidfile, "Pid file");
|
||||
cobra2statsd->add_option("--filter", filter, "Stream SQL Filter");
|
||||
cobra2statsd->add_option("--position", position, "Stream position");
|
||||
cobra2statsd->add_option("--queue_size",
|
||||
maxQueueSize,
|
||||
"Size of the queue to hold messages before they are sent to Sentry");
|
||||
addTLSOptions(cobra2statsd);
|
||||
addCobraConfig(cobra2statsd);
|
||||
|
||||
@ -450,8 +453,20 @@ int main(int argc, char** argv)
|
||||
}
|
||||
else if (app.got_subcommand("cobra_to_statsd"))
|
||||
{
|
||||
ret = ix::cobra_to_statsd_bot(
|
||||
cobraConfig, channel, filter, position, hostname, statsdPort, prefix, fields, verbose);
|
||||
bool enableHeartbeat = true;
|
||||
int runtime = -1;
|
||||
ix::StatsdClient statsdClient(hostname, statsdPort, prefix);
|
||||
|
||||
ret = ix::cobra_to_statsd_bot(cobraConfig,
|
||||
channel,
|
||||
filter,
|
||||
position,
|
||||
statsdClient,
|
||||
fields,
|
||||
verbose,
|
||||
maxQueueSize,
|
||||
enableHeartbeat,
|
||||
runtime);
|
||||
}
|
||||
else if (app.got_subcommand("cobra_to_sentry"))
|
||||
{
|
||||
|
Reference in New Issue
Block a user