xrpld
Loading...
Searching...
No Matches
xrpl::GRPCServerImpl Class Referencefinal

#include <GRPCServer.h>

Collaboration diagram for xrpl::GRPCServerImpl:

Classes

class  CallData

Public Member Functions

 GRPCServerImpl (Application &app)
 GRPCServerImpl (GRPCServerImpl const &)=delete
GRPCServerImploperator= (GRPCServerImpl const &)=delete
void shutdown ()
bool start ()
void handleRpcs ()
std::vector< std::shared_ptr< Processor > > setupListeners ()
boost::asio::ip::tcp::endpoint getEndpoint () const

Private Types

template<class Request, class Response>
using BindListener
template<class Request, class Response>
using Handler = std::function<std::pair<Response, grpc::Status>(RPC::GRPCContext<Request>&)>
template<class Request, class Response>
using Forward

Private Member Functions

std::shared_ptr< grpc::ServerCredentials > createServerCredentials ()

Private Attributes

std::unique_ptr< grpc::ServerCompletionQueue > cq_
std::vector< std::shared_ptr< Processor > > requests_
org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService service_
std::unique_ptr< grpc::Server > server_
Applicationapp_
std::string serverAddress_
std::uint16_t serverPort_ = 0
std::vector< boost::asio::ip::address > secureGatewayIPs_
std::optional< std::stringsslCertPath_
std::optional< std::stringsslKeyPath_
std::optional< std::stringsslCertChainPath_
std::optional< std::stringsslClientCAPath_
beast::Journal journal_

Static Private Attributes

static constexpr unsigned kApiVersion = 1

Detailed Description

Definition at line 48 of file GRPCServer.h.

Member Typedef Documentation

◆ BindListener

template<class Request, class Response>
using xrpl::GRPCServerImpl::BindListener
private
Initial value:
org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService&,
grpc::ServerContext*,
Request*,
grpc::ServerAsyncResponseWriter<Response>*,
grpc::CompletionQueue*,
grpc::ServerCompletionQueue*,
void*)>

Definition at line 82 of file GRPCServer.h.

◆ Handler

template<class Request, class Response>
using xrpl::GRPCServerImpl::Handler = std::function<std::pair<Response, grpc::Status>(RPC::GRPCContext<Request>&)>
private

Definition at line 94 of file GRPCServer.h.

◆ Forward

template<class Request, class Response>
using xrpl::GRPCServerImpl::Forward
private
Initial value:
std::function<grpc::Status(
org::xrpl::rpc::v1::XRPLedgerAPIService::Stub*,
grpc::ClientContext*,
Request,
Response*)>

Definition at line 99 of file GRPCServer.h.

Constructor & Destructor Documentation

◆ GRPCServerImpl() [1/2]

xrpl::GRPCServerImpl::GRPCServerImpl ( Application & app)
explicit

Definition at line 334 of file GRPCServer.cpp.

◆ GRPCServerImpl() [2/2]

xrpl::GRPCServerImpl::GRPCServerImpl ( GRPCServerImpl const & )
delete

Member Function Documentation

◆ operator=()

GRPCServerImpl & xrpl::GRPCServerImpl::operator= ( GRPCServerImpl const & )
delete

◆ shutdown()

void xrpl::GRPCServerImpl::shutdown ( )

Definition at line 438 of file GRPCServer.cpp.

◆ start()

bool xrpl::GRPCServerImpl::start ( )

Definition at line 703 of file GRPCServer.cpp.

◆ handleRpcs()

void xrpl::GRPCServerImpl::handleRpcs ( )

Definition at line 460 of file GRPCServer.cpp.

◆ setupListeners()

std::vector< std::shared_ptr< Processor > > xrpl::GRPCServerImpl::setupListeners ( )

Definition at line 527 of file GRPCServer.cpp.

◆ getEndpoint()

boost::asio::ip::tcp::endpoint xrpl::GRPCServerImpl::getEndpoint ( ) const
nodiscard

Definition at line 770 of file GRPCServer.cpp.

◆ createServerCredentials()

std::shared_ptr< grpc::ServerCredentials > xrpl::GRPCServerImpl::createServerCredentials ( )
private

Definition at line 605 of file GRPCServer.cpp.

Member Data Documentation

◆ cq_

std::unique_ptr<grpc::ServerCompletionQueue> xrpl::GRPCServerImpl::cq_
private

Definition at line 53 of file GRPCServer.h.

◆ requests_

std::vector<std::shared_ptr<Processor> > xrpl::GRPCServerImpl::requests_
private

Definition at line 55 of file GRPCServer.h.

◆ service_

org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService xrpl::GRPCServerImpl::service_
private

Definition at line 58 of file GRPCServer.h.

◆ server_

std::unique_ptr<grpc::Server> xrpl::GRPCServerImpl::server_
private

Definition at line 60 of file GRPCServer.h.

◆ app_

Application& xrpl::GRPCServerImpl::app_
private

Definition at line 62 of file GRPCServer.h.

◆ serverAddress_

std::string xrpl::GRPCServerImpl::serverAddress_
private

Definition at line 64 of file GRPCServer.h.

◆ serverPort_

std::uint16_t xrpl::GRPCServerImpl::serverPort_ = 0
private

Definition at line 65 of file GRPCServer.h.

◆ secureGatewayIPs_

std::vector<boost::asio::ip::address> xrpl::GRPCServerImpl::secureGatewayIPs_
private

Definition at line 67 of file GRPCServer.h.

◆ sslCertPath_

std::optional<std::string> xrpl::GRPCServerImpl::sslCertPath_
private

Definition at line 70 of file GRPCServer.h.

◆ sslKeyPath_

std::optional<std::string> xrpl::GRPCServerImpl::sslKeyPath_
private

Definition at line 71 of file GRPCServer.h.

◆ sslCertChainPath_

std::optional<std::string> xrpl::GRPCServerImpl::sslCertChainPath_
private

Definition at line 72 of file GRPCServer.h.

◆ sslClientCAPath_

std::optional<std::string> xrpl::GRPCServerImpl::sslClientCAPath_
private

Definition at line 74 of file GRPCServer.h.

◆ journal_

beast::Journal xrpl::GRPCServerImpl::journal_
private

Definition at line 76 of file GRPCServer.h.

◆ kApiVersion

unsigned xrpl::GRPCServerImpl::kApiVersion = 1
staticconstexprprivate

Definition at line 96 of file GRPCServer.h.