20 #ifndef RIPPLE_RESOURCE_MANAGER_H_INCLUDED
21 #define RIPPLE_RESOURCE_MANAGER_H_INCLUDED
23 #include <ripple/beast/insight/Collector.h>
24 #include <ripple/beast/net/IPEndpoint.h>
25 #include <ripple/beast/utility/Journal.h>
26 #include <ripple/beast/utility/PropertyStream.h>
27 #include <ripple/json/json_value.h>
28 #include <ripple/resource/Consumer.h>
29 #include <ripple/resource/Gossip.h>
30 #include <boost/utility/string_view.hpp>
virtual Consumer newInboundEndpoint(beast::IP::Endpoint const &address)=0
Create a new endpoint keyed by inbound IP address or the forwarded IP if proxied.
virtual Consumer newOutboundEndpoint(beast::IP::Endpoint const &address)=0
Create a new endpoint keyed by outbound IP address and port.
virtual Json::Value getJson()=0
Extract consumer information for reporting.
Data format for exchanging consumption information across peers.
Subclasses can be called to write to a stream and have children.
virtual Gossip exportConsumers()=0
Extract packaged consumer information for export.
virtual void importConsumers(std::string const &origin, Gossip const &gossip)=0
Import packaged consumer information.
boost::string_view forwardedFor(http_request_type const &request)
A generic endpoint for log messages.
Tracks load and resource consumption.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::unique_ptr< Manager > make_Manager(beast::insight::Collector::ptr const &collector, beast::Journal journal)
virtual Consumer newUnlimitedEndpoint(beast::IP::Endpoint const &address)=0
Create a new unlimited endpoint keyed by forwarded IP.
An endpoint that consumes resources.
A version-independent IP address and port combination.