Clio  develop
The XRP Ledger API server.
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
10namespace etl {
11
19
24 virtual ~LoaderInterface() = default;
25
31 [[nodiscard]] virtual std::expected<void, LoaderError>
33
39 [[nodiscard]] virtual std::optional<xrpl::LedgerHeader>
41};
42
43} // namespace etl
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:56
This namespace contains everything to do with the ETL and ETL sources.
Definition AmendmentBlockHandlerInterface.hpp:6
LoaderError
Enumeration of possible errors that can occur during loading operations.
Definition LoaderInterface.hpp:15
@ AmendmentBlocked
Error indicating that an operation is blocked by an amendment.
Definition LoaderInterface.hpp:16
@ WriteConflict
Error indicating that a write operation resulted in a conflict.
Definition LoaderInterface.hpp:17
An interface for a ETL Loader.
Definition LoaderInterface.hpp:23
virtual std::optional< xrpl::LedgerHeader > loadInitialLedger(model::LedgerData const &data)=0
Load the initial ledger.
virtual std::expected< void, LoaderError > load(model::LedgerData const &data)=0
Load ledger data.
Represents an entire ledger diff worth of transactions and objects.
Definition Models.hpp:129