20 #ifndef RIPPLE_OVERLAY_CLUSTER_H_INCLUDED
21 #define RIPPLE_OVERLAY_CLUSTER_H_INCLUDED
23 #include <ripple/app/main/Application.h>
24 #include <ripple/basics/BasicConfig.h>
25 #include <ripple/basics/chrono.h>
26 #include <ripple/beast/hash/uhash.h>
27 #include <ripple/beast/utility/Journal.h>
28 #include <ripple/overlay/ClusterNode.h>
29 #include <ripple/protocol/PublicKey.h>
Holds a collection of configuration values.
Cluster(beast::Journal j)
bool operator()(PublicKey const &lhs, ClusterNode const &rhs) const
std::optional< std::string > member(PublicKey const &node) const
Determines whether a node belongs in the cluster.
bool update(PublicKey const &identity, std::string name, std::uint32_t loadFee=0, NetClock::time_point reportTime=NetClock::time_point{})
Store information about the state of a cluster node.
bool load(Section const &nodes)
Load the list of cluster nodes.
A generic endpoint for log messages.
std::size_t size() const
The number of nodes in the cluster list.
bool operator()(ClusterNode const &lhs, ClusterNode const &rhs) const
bool operator()(ClusterNode const &lhs, PublicKey const &rhs) const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::set< ClusterNode, Comparator > nodes_
void for_each(std::function< void(ClusterNode const &)> func) const
Invokes the callback once for every cluster node.
PublicKey const & identity() const