42 lines
1.2 KiB
C++
42 lines
1.2 KiB
C++
#include "RunFix.h"
|
|
#include "server/sparkd/fix/FixInit.h"
|
|
|
|
#include "lib/api/public/ServiceContext.h"
|
|
#include "lib/config/config.h"
|
|
#include "lib/config/protos/Ports.pb.h"
|
|
#include "lib/config/protos/quickbus_cfg.pb.h"
|
|
#include "lib/logging/logging.h"
|
|
#include "lib/os/os.h"
|
|
#include "lib/quickbus/quickbus.h"
|
|
#include "lib/utils/Dispatcher.h"
|
|
#include "lib/utils/thread_manager.h"
|
|
|
|
#include "lib/config/protos/toggles.pb.h"
|
|
#include "lib/md/SyntheticSecurityService.h"
|
|
#include "lib/md/MDClient.h"
|
|
|
|
|
|
namespace bts {
|
|
namespace cmd {
|
|
|
|
int RunFix::execute(std::vector<std::string> const &)
|
|
{
|
|
config::QuickbusNodeCfg qb_cfg;
|
|
auto &ports = config::get<config::Ports>();
|
|
qb_cfg.set_my_port(ports.qbus_port());
|
|
qbus::Quickbus quickbus(qb_cfg,
|
|
qbus::Quickbus::ThreadOptions::deferred_start);
|
|
api::ServiceContext sc(&quickbus);
|
|
|
|
api::synthetic::SyntheticSecurityService synthetic_service(sc);
|
|
md::MDClient mdclient(&utils::Dispatcher::background(), &synthetic_service);
|
|
|
|
threading::make_thread("SparkFix", [&sc, &mdclient]() { fix::FixInit::start_acceptor(sc, mdclient); })
|
|
.detach();
|
|
return 0;
|
|
}
|
|
|
|
std::string RunFix::help () {return "\t run fix acceptor";}
|
|
|
|
}}
|