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,
/*< Error indicating that an operation is blocked by an amendment */
17
WriteConflict,
/*< Error indicating that a write operation resulted in a conflict */
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::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:124
src
etl
LoaderInterface.hpp
Generated by
1.17.0