|
Clio
develop
The XRP Ledger API server.
|
An interface for LoadBalancer. More...
#include <LoadBalancerInterface.hpp>

Public Member Functions | |
| virtual InitialLedgerLoadResult | loadInitialLedger (uint32_t sequence, InitialLoadObserverInterface &loader, std::chrono::steady_clock::duration retryAfter=std::chrono::seconds{2})=0 |
| Load the initial ledger, writing data to the queue. | |
| virtual OptionalGetLedgerResponseType | fetchLedger (uint32_t ledgerSequence, bool getObjects, bool getObjectNeighbors, std::chrono::steady_clock::duration retryAfter=std::chrono::seconds{2})=0 |
| Fetch data for a specific ledger. | |
| virtual boost::json::value | toJson () const =0 |
| Represent the state of this load balancer as a JSON object. | |
| virtual std::expected< boost::json::object, rpc::CombinedError > | forwardToRippled (boost::json::object const &request, std::optional< std::string > const &clientIp, bool isAdmin, boost::asio::yield_context yield)=0 |
| Forward a JSON RPC request to a randomly selected rippled node. | |
| virtual std::optional< ETLState > | getETLState () noexcept=0 |
| Return state of ETL nodes. | |
| virtual void | stop (boost::asio::yield_context yield)=0 |
| Stop the load balancer. This will stop all subscription sources. | |
An interface for LoadBalancer.
|
nodiscardpure virtual |
Fetch data for a specific ledger.
This function will continuously try to fetch data for the specified ledger until the fetch succeeds, the ledger is found in the database, or the server is shutting down.
| ledgerSequence | Sequence of the ledger to fetch |
| getObjects | Whether to get the account state diff between this ledger and the prior one |
| getObjectNeighbors | Whether to request object neighbors |
| retryAfter | Time to wait between retries (2 seconds by default) |
Implemented in etl::LoadBalancer.
|
nodiscardpure virtual |
Forward a JSON RPC request to a randomly selected rippled node.
| request | JSON-RPC request to forward |
| clientIp | The IP address of the peer, if known |
| isAdmin | Whether the request is from an admin |
| yield | The coroutine context |
Implemented in etl::LoadBalancer.
|
nodiscardpure virtualnoexcept |
Return state of ETL nodes.
Implemented in etl::LoadBalancer.
|
nodiscardpure virtual |
Load the initial ledger, writing data to the queue.
| sequence | Sequence of ledger to download |
| loader | InitialLoadObserverInterface implementation |
| retryAfter | Time to wait between retries (2 seconds by default) |
Implemented in etl::LoadBalancer.
|
pure virtual |
Stop the load balancer. This will stop all subscription sources.
| yield | The coroutine context |
Implemented in etl::LoadBalancer.
|
nodiscardpure virtual |
Represent the state of this load balancer as a JSON object.
Implemented in etl::LoadBalancer.