Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
MonitorProvider.hpp
1#pragma once
2
3#include "data/BackendInterface.hpp"
4#include "etl/MonitorInterface.hpp"
5#include "etl/MonitorProviderInterface.hpp"
7#include "etl/impl/Monitor.hpp"
8#include "util/async/AnyExecutionContext.hpp"
9
10#include <chrono>
11#include <cstdint>
12#include <memory>
13#include <utility>
14
15namespace etl::impl {
16
18public:
19 std::unique_ptr<MonitorInterface>
22 std::shared_ptr<BackendInterface> backend,
23 std::shared_ptr<NetworkValidatedLedgersInterface> validatedLedgers,
24 uint32_t startSequence,
25 std::chrono::steady_clock::duration dbStalledReportDelay
26 ) override
27 {
28 return std::make_unique<Monitor>(
29 std::move(ctx),
30 std::move(backend),
31 std::move(validatedLedgers),
32 startSequence,
33 dbStalledReportDelay
34 );
35 }
36};
37
38} // namespace etl::impl
Definition MonitorProvider.hpp:17
std::unique_ptr< MonitorInterface > make(util::async::AnyExecutionContext ctx, std::shared_ptr< BackendInterface > backend, std::shared_ptr< NetworkValidatedLedgersInterface > validatedLedgers, uint32_t startSequence, std::chrono::steady_clock::duration dbStalledReportDelay) override
Create a new Monitor instance.
Definition MonitorProvider.hpp:20
A type-erased execution context.
Definition AnyExecutionContext.hpp:22
An interface for providing Monitor instances.
Definition MonitorProviderInterface.hpp:17