a6b8d6b4cf
Summary: * main file (copied distributed_test.cpp), start_main.py, config Made a dedicated client and memgraph file (stubs) + code structure changes Reviewers: sasa.stanko Reviewed By: sasa.stanko Subscribers: pullbot, lion, buda Differential Revision: https://phabricator.memgraph.io/D709
26 lines
518 B
C++
26 lines
518 B
C++
#include "memgraph_config.hpp"
|
|
|
|
DEFINE_string(config_filename, "", "File containing list of all processes");
|
|
|
|
Config ParseConfig(const std::string &filename) {
|
|
std::ifstream file(filename, std::ifstream::in);
|
|
assert(file.good());
|
|
|
|
Config config;
|
|
|
|
while (file.good()) {
|
|
MnidT mnid;
|
|
std::string address;
|
|
uint16_t port;
|
|
|
|
file >> mnid >> address >> port;
|
|
if (file.eof())
|
|
break;
|
|
|
|
config.nodes.push_back(Config::NodeConfig{mnid, address, port});
|
|
}
|
|
|
|
file.close();
|
|
return config;
|
|
}
|