snake: stream sql mock + add republished channel option

This commit is contained in:
Benjamin Sergeant
2020-07-10 15:06:55 -07:00
parent c98959b895
commit 26a1e63626
11 changed files with 102 additions and 4 deletions

View File

@ -122,6 +122,7 @@ int main(int argc, char** argv)
std::string key;
std::string logfile;
std::string scriptPath;
std::string republishChannel;
ix::SocketTLSOptions tlsOptions;
ix::CobraConfig cobraConfig;
ix::CobraBotConfig cobraBotConfig;
@ -391,6 +392,7 @@ int main(int argc, char** argv)
snakeApp->add_option("--redis_password", redisPassword, "Redis password");
snakeApp->add_option("--apps_config_path", appsConfigPath, "Path to auth data")
->check(CLI::ExistingPath);
snakeApp->add_option("--republish_channel", republishChannel, "Republish channel");
snakeApp->add_flag("-v", verbose, "Verbose");
snakeApp->add_flag("-d", disablePong, "Disable Pongs");
addTLSOptions(snakeApp);
@ -637,7 +639,8 @@ int main(int argc, char** argv)
verbose,
appsConfigPath,
tlsOptions,
disablePong);
disablePong,
republishChannel);
}
else if (app.got_subcommand("httpd"))
{

View File

@ -103,7 +103,8 @@ namespace ix
bool verbose,
const std::string& appsConfigPath,
const ix::SocketTLSOptions& tlsOptions,
bool disablePong);
bool disablePong,
const std::string& republishChannel);
int ws_httpd_main(int port,
const std::string& hostname,

View File

@ -45,7 +45,8 @@ namespace ix
bool verbose,
const std::string& appsConfigPath,
const SocketTLSOptions& socketTLSOptions,
bool disablePong)
bool disablePong,
const std::string& republishChannel)
{
snake::AppConfig appConfig;
appConfig.port = port;
@ -55,6 +56,7 @@ namespace ix
appConfig.redisPassword = redisPassword;
appConfig.socketTLSOptions = socketTLSOptions;
appConfig.disablePong = disablePong;
appConfig.republishChannel = republishChannel;
// Parse config file
auto str = readAsString(appsConfigPath);