Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
HandlerRegistry.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "rpc/common/AnyHandler.hpp"
5
6#include <memory>
7#include <span>
8#include <string_view>
9
10namespace data {
13} // namespace data
14
15namespace etl {
18} // namespace etl
19
20namespace feed {
22} // namespace feed
23
24namespace util::config {
25class ClioConfigDefinition;
26} // namespace util::config
27
28namespace rpc {
29class Counters;
30} // namespace rpc
31
32namespace rpc::impl {
33
42 std::shared_ptr<data::BackendInterface> const& backend;
43 std::shared_ptr<feed::SubscriptionManagerInterface> const& subscriptionManager;
44 std::shared_ptr<etl::LoadBalancerInterface> const& balancer;
45 std::shared_ptr<etl::ETLServiceInterface const> const& etl;
46 std::shared_ptr<data::AmendmentCenterInterface const> const& amendmentCenter;
47 Counters const& counters;
48};
49
57
63 std::string_view name;
64 HandlerFactory factory;
65 bool isClioOnly = false;
66};
67
76[[nodiscard]] std::span<HandlerEntry const>
77handlerRegistry() noexcept;
78
79} // namespace rpc::impl
AnyHandler(*)(HandlerDeps const &) HandlerFactory
Constructs one type-erased handler from the available dependencies.
Definition HandlerRegistry.hpp:56
The interface of an amendment center.
Definition AmendmentCenterInterface.hpp:17
The interface to the database used by Clio.
Definition BackendInterface.hpp:211
An interface for LoadBalancer.
Definition LoadBalancerInterface.hpp:40
Interface of subscription manager. A subscription manager is responsible for managing the subscriptio...
Definition SubscriptionManagerInterface.hpp:25
A type-erased Handler that can contain any (NextGen) RPC handler class.
Definition AnyHandler.hpp:20
Holds information about successful, failed, forwarded, etc. RPC handler calls.
Definition Counters.hpp:22
All the config data will be stored and extracted from this class.
Definition ConfigDefinition.hpp:31
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:56
This namespace implements everything related to subscriptions.
Definition BookChangesFeed.hpp:14
This namespace contains all the RPC logic and handlers.
Definition AMMHelpers.cpp:17
This is a base class for any ETL service implementations.
Definition ETLServiceInterface.hpp:17
The bundle of runtime dependencies a handler factory may consume.
Definition HandlerRegistry.hpp:40
One row of the handler registry: the method name, how to construct the handler, and its static metada...
Definition HandlerRegistry.hpp:62