Add cobra_metrics_to_redis sub-command to create streams for each cobra metric event being received.

This commit is contained in:
Benjamin Sergeant
2019-10-24 14:42:25 -07:00
parent adf83f3255
commit c40033b6d9
9 changed files with 343 additions and 18 deletions

View File

@@ -30,12 +30,27 @@ namespace ix
bool auth(const std::string& password, std::string& response);
// Publish / Subscribe
bool publish(const std::string& channel, const std::string& message, std::string& errMsg);
bool subscribe(const std::string& channel,
const OnRedisSubscribeResponseCallback& responseCallback,
const OnRedisSubscribeCallback& callback);
// XADD
std::string xadd(
const std::string& channel,
const std::string& message,
std::string& errMsg);
std::string prepareXaddCommand(
const std::string& stream,
const std::string& message);
std::string readXaddReply(std::string& errMsg);
bool sendCommand(const std::string& commands, int commandsCount, std::string& errMsg);
void stop();
private: