paxos/src/config/config.hh
2020-05-06 19:00:09 +02:00

29 lines
526 B
C++

#pragma once
#include<iostream>
#include <string>
#include "misc/json.hh"
namespace paxos
{
struct LegislatorConfig
{
std::string ip;
std::string port;
std::string name;
bool is_self;
};
struct ServerConfig
{
ServerConfig(const std::vector<LegislatorConfig>& legislators,
const LegislatorConfig& self);
std::vector<LegislatorConfig> legislators_;
LegislatorConfig self_;
static ServerConfig parse(char **argv);
};
}