6 #ifndef KAGOME_API_JRPC_SERVER_IMPL_HPP 7 #define KAGOME_API_JRPC_SERVER_IMPL_HPP 9 #include <jsonrpc-lean/server.h> 52 const jsonrpc::Request::Parameters &from,
70 #endif // KAGOME_API_JRPC_SERVER_IMPL_HPP
jsonrpc::Server jsonrpc_handler_
json rpc server instance
OUTCOME_HPP_DECLARE_ERROR(kagome::api, JRpcServerImpl::Error)
~JRpcServerImpl() override=default
std::function< void(outcome::result< std::string_view >)> FormatterHandler
std::unique_ptr< Registry > RegistryPtr
RegistryPtr createRegistry()
void processJsonData(std::string method_name, const jsonrpc::Request::Parameters &from, const FormatterHandler &cb) override
creates a valid jsonrpc response and passes it to
void registerHandler(const std::string &name, Method method) override
registers rpc request handler lambda
std::function< void(std::string_view)> ResponseHandler
jsonrpc::JsonFormatHandler format_handler_
format handler instance
metrics::Counter * metric_rpc_requests_count_
std::vector< std::string > getHandlerNames() override
void processData(std::string_view request, const ResponseHandler &cb) override
handles decoded network message
jsonrpc::MethodWrapper::Method Method
metrics::RegistryPtr metrics_registry_
A counter metric to represent a monotonically increasing value.