Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
ETLServiceInterface.hpp
1#pragma once
2
3#include "etl/ETLState.hpp"
4
5#include <boost/json/object.hpp>
6
7#include <cstdint>
8#include <optional>
9
10namespace etl {
11
18 virtual ~ETLServiceInterface() = default;
19
23 virtual void
24 run() = 0;
25
30 virtual void
31 stop() = 0;
32
38 [[nodiscard]] virtual boost::json::object
39 getInfo() const = 0;
40
46 [[nodiscard]] virtual bool
47 isAmendmentBlocked() const = 0;
48
54 [[nodiscard]] virtual bool
56
61 [[nodiscard]] virtual std::optional<ETLState>
62 getETLState() const = 0;
63
69 [[nodiscard]] virtual std::uint32_t
71};
72
73} // namespace etl
This is a base class for any ETL service implementations.
Definition ETLServiceInterface.hpp:17
virtual bool isCorruptionDetected() const =0
Check whether Clio detected DB corruptions.
virtual std::uint32_t lastCloseAgeSeconds() const =0
Get time passed since last ledger close, in seconds.
virtual boost::json::object getInfo() const =0
Get state of ETL as a JSON object.
virtual bool isAmendmentBlocked() const =0
Check for the amendment blocked state.
virtual void stop()=0
Stop the ETL service.
virtual void run()=0
Start all components to run ETL service.
virtual std::optional< ETLState > getETLState() const =0
Get the etl nodes' state.