22#include "etl/WriterState.hpp"
24#include <boost/json/conversion.hpp>
25#include <boost/json/value.hpp>
26#include <boost/uuid/uuid.hpp>
55 enum class DbRole { ReadOnly = 0, LoadingCache = 1, NotWriter = 2, Writer = 3, Fallback = 4, MAX = 4 };
57 using Uuid = std::shared_ptr<boost::uuids::uuid>;
58 using CUuid = std::shared_ptr<boost::uuids::uuid const>;
76tag_invoke(boost::json::value_from_tag, boost::json::value& jv,
ClioNode const& node);
79tag_invoke(boost::json::value_to_tag<ClioNode>, boost::json::value
const& jv);
Interface for managing writer state in the ETL subsystem.
Definition WriterState.hpp:35
Represents a node in the cluster.
Definition ClioNode.hpp:36
Uuid uuid
The UUID of the node.
Definition ClioNode.hpp:60
DbRole dbRole
The database role of the node.
Definition ClioNode.hpp:62
std::chrono::system_clock::time_point updateTime
The time the data about the node was last updated.
Definition ClioNode.hpp:61
DbRole
Database role of a node in the cluster.
Definition ClioNode.hpp:55
static constexpr char const * kTIME_FORMAT
The format of the time to store in the database.
Definition ClioNode.hpp:40
static ClioNode from(Uuid uuid, etl::WriterStateInterface const &writerState)
Create a ClioNode from writer state.
Definition ClioNode.cpp:50