memgraph/experimental/distributed/src/memgraph_config.cpp
Goran Zuzic a6b8d6b4cf Make Distributed Memgraph Stub
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
2017-08-24 16:58:35 +02:00

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;
}