Clio
develop
The XRP Ledger API server.
Theme:
Default
Round
Robot
Toggle main menu visibility
Loading...
Searching...
No Matches
LoaderInterface.hpp
1
#pragma once
2
3
#include "etl/Models.hpp"
4
5
#include <xrpl/protocol/LedgerHeader.h>
6
7
#include <expected>
8
#include <optional>
9
10
namespace
etl
{
11
15
enum class
LoaderError
{
16
AmendmentBlocked
,
17
WriteConflict
,
18
};
19
23
struct
LoaderInterface
{
24
virtual
~LoaderInterface
() =
default
;
25
31
[[nodiscard]]
virtual
std::expected<void, LoaderError>
32
load
(
model::LedgerData
const
&
data
) = 0;
33
39
[[nodiscard]]
virtual
std::optional<xrpl::LedgerHeader>
40
loadInitialLedger
(
model::LedgerData
const
&
data
) = 0;
41
};
42
43
}
// namespace etl
data
This namespace implements the data access layer and related components.
Definition
AmendmentCenter.cpp:56
etl
This namespace contains everything to do with the ETL and ETL sources.
Definition
AmendmentBlockHandlerInterface.hpp:6
etl::LoaderError
LoaderError
Enumeration of possible errors that can occur during loading operations.
Definition
LoaderInterface.hpp:15
etl::LoaderError::AmendmentBlocked
@ AmendmentBlocked
Error indicating that an operation is blocked by an amendment.
Definition
LoaderInterface.hpp:16
etl::LoaderError::WriteConflict
@ WriteConflict
Error indicating that a write operation resulted in a conflict.
Definition
LoaderInterface.hpp:17
etl::LoaderInterface
An interface for a ETL Loader.
Definition
LoaderInterface.hpp:23
etl::LoaderInterface::loadInitialLedger
virtual std::optional< xrpl::LedgerHeader > loadInitialLedger(model::LedgerData const &data)=0
Load the initial ledger.
etl::LoaderInterface::load
virtual std::expected< void, LoaderError > load(model::LedgerData const &data)=0
Load ledger data.
etl::model::LedgerData
Represents an entire ledger diff worth of transactions and objects.
Definition
Models.hpp:129
src
etl
LoaderInterface.hpp
Generated by
1.17.0