17#ifndef DAISI_PATH_PLANNING_CONSENSUS_CONSENSUS_TYPES_H_
18#define DAISI_PATH_PLANNING_CONSENSUS_CONSENSUS_TYPES_H_
20#include <unordered_map>
22namespace daisi::path_planning::consensus {
23enum class ConsensusType { kNone, kPaxos, kCentral };
30inline ConsensusType consensusTypeFromString(
const std::string &consensus_type) {
31 static std::unordered_map<std::string, ConsensusType> string_to_consensus_type{
32 {
"paxos", ConsensusType::kPaxos}, {
"central", ConsensusType::kCentral}};
33 return string_to_consensus_type.at(consensus_type);