Add simple Redis Server which is only capable of doing publish / subscribe. New ws redis_server sub-command to use it. The server is used in the unittest, so that we can run on CI in environment where redis isn not available like github actions env.

This commit is contained in:
Benjamin Sergeant
2019-09-23 21:04:01 -07:00
parent 95722e3bbb
commit ceb0c602c9
20 changed files with 497 additions and 27 deletions

View File

@ -243,6 +243,10 @@ int main(int argc, char** argv)
autobahnApp->add_option("--url", url, "url");
autobahnApp->add_flag("-q", quiet, "Quiet");
CLI::App* redisServerApp = app.add_subcommand("redis_server", "Redis server");
redisServerApp->add_option("--port", port, "Port");
redisServerApp->add_option("--host", hostname, "Hostname");
CLI11_PARSE(app, argc, argv);
// pid file handling
@ -364,6 +368,10 @@ int main(int argc, char** argv)
{
ret = ix::ws_autobahn_main(url, quiet);
}
else if (app.got_subcommand("redis_server"))
{
ret = ix::ws_redis_server_main(port, hostname);
}
ix::uninitNetSystem();
return ret;