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

GRPC Ledger data fetcher. More...

#include <LedgerFetcher.hpp>

Inheritance diagram for etl::impl::LedgerFetcher:
Collaboration diagram for etl::impl::LedgerFetcher:

Public Member Functions

 LedgerFetcher (std::shared_ptr< BackendInterface > backend, std::shared_ptr< etlng::LoadBalancerInterface > balancer)
 Create an instance of the fetcher.
 
OptionalGetLedgerResponseType fetchData (uint32_t sequence) override
 Extract data for a particular ledger from an ETL source.
 
OptionalGetLedgerResponseType fetchDataAndDiff (uint32_t sequence) override
 Extract diff data for a particular ledger from an ETL source.
 
- Public Member Functions inherited from etl::LedgerFetcherInterface

Additional Inherited Members

- Public Types inherited from etl::LedgerFetcherInterface
using GetLedgerResponseType = org::xrpl::rpc::v1::GetLedgerResponse
 
using OptionalGetLedgerResponseType = std::optional<GetLedgerResponseType>
 

Detailed Description

GRPC Ledger data fetcher.

Member Function Documentation

◆ fetchData()

OptionalGetLedgerResponseType etl::impl::LedgerFetcher::fetchData ( uint32_t sequence)
inlinenodiscardoverridevirtual

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

Implements etl::LedgerFetcherInterface.

◆ fetchDataAndDiff()

OptionalGetLedgerResponseType etl::impl::LedgerFetcher::fetchDataAndDiff ( uint32_t sequence)
inlinenodiscardoverridevirtual

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

Implements etl::LedgerFetcherInterface.


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