Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
HandlerRegistry.hpp File Reference
#include "rpc/common/AnyHandler.hpp"
#include <memory>
#include <span>
#include <string_view>
Include dependency graph for HandlerRegistry.hpp:

Go to the source code of this file.

Classes

struct  rpc::impl::HandlerDeps
 The bundle of runtime dependencies a handler factory may consume. More...
struct  rpc::impl::HandlerEntry
 One row of the handler registry: the method name, how to construct the handler, and its static metadata. More...

Namespaces

namespace  data
 This namespace implements the data access layer and related components.
namespace  feed
 This namespace implements everything related to subscriptions.
namespace  util
 This namespace contains various utilities.
namespace  rpc
 This namespace contains all the RPC logic and handlers.

Typedefs

using rpc::impl::HandlerFactory = AnyHandler (*)(HandlerDeps const&)
 Constructs one type-erased handler from the available dependencies.

Functions

std::span< HandlerEntry const > rpc::impl::handlerRegistry () noexcept
 The full set of registered RPC handlers.

Typedef Documentation

◆ HandlerFactory

using rpc::impl::HandlerFactory = AnyHandler (*)(HandlerDeps const&)

Constructs one type-erased handler from the available dependencies.

A plain function pointer rather than std::function so that the registry stays a literal type and is constant-initialised.

Function Documentation

◆ handlerRegistry()

std::span< HandlerEntry const > rpc::impl::handlerRegistry ( )
nodiscardnoexcept

The full set of registered RPC handlers.

Static data: reading the registry constructs no handler and requires no runtime dependencies.

Returns
A span over the registry, valid for the lifetime of the program