Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
etl::impl::LedgerFetcher< LoadBalancerType > Class Template Reference

GRPC Ledger data fetcher. More...

#include <LedgerFetcher.hpp>

Public Types

using OptionalGetLedgerResponseType = typename LoadBalancerType::OptionalGetLedgerResponseType
 

Public Member Functions

 LedgerFetcher (std::shared_ptr< BackendInterface > backend, std::shared_ptr< LoadBalancerType > balancer)
 Create an instance of the fetcher.
 
OptionalGetLedgerResponseType fetchData (uint32_t sequence)
 Extract data for a particular ledger from an ETL source.
 
OptionalGetLedgerResponseType fetchDataAndDiff (uint32_t sequence)
 Extract diff data for a particular ledger from an ETL source.
 

Detailed Description

template<typename LoadBalancerType>
class etl::impl::LedgerFetcher< LoadBalancerType >

GRPC Ledger data fetcher.

Member Function Documentation

◆ fetchData()

template<typename LoadBalancerType >
OptionalGetLedgerResponseType etl::impl::LedgerFetcher< LoadBalancerType >::fetchData ( uint32_t sequence)
inlinenodiscard

Extract data for a particular ledger from an ETL source.

This function continously tries to extract the specified ledger (using all available ETL sources) until the extraction succeeds, or the server shuts down.

Parameters
sequencesequence of the ledger to extract
Returns
Ledger header and transaction+metadata blobs; Empty optional if the server is shutting down

◆ fetchDataAndDiff()

template<typename LoadBalancerType >
OptionalGetLedgerResponseType etl::impl::LedgerFetcher< LoadBalancerType >::fetchDataAndDiff ( uint32_t sequence)
inlinenodiscard

Extract diff data for a particular ledger from an ETL source.

This function continously tries to extract the specified ledger (using all available ETL sources) until the extraction succeeds, or the server shuts down.

Parameters
sequencesequence of the ledger to extract
Returns
Ledger data diff between sequance and parent; Empty optional if the server is shutting down

The documentation for this class was generated from the following file: