rippled
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Types | Private Attributes | Static Private Attributes | List of all members
xrpl::GRPCServerImpl Class Referencefinal

#include <GRPCServer.h>

Collaboration diagram for xrpl::GRPCServerImpl:
Collaboration graph
[legend]

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 = std::function< void(org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService &, grpc::ServerContext *, Request *, grpc::ServerAsyncResponseWriter< Response > *, grpc::CompletionQueue *, grpc::ServerCompletionQueue *, void *)>
 
template<class Request , class Response >
using Handler = std::function< std::pair< Response, grpc::Status >(RPC::GRPCContext< Request > &)>
 
template<class Request , class Response >
using Forward = std::function< grpc::Status(org::xrpl::rpc::v1::XRPLedgerAPIService::Stub *, grpc::ClientContext *, Request, Response *)>
 

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_
 
beast::Journal journal_
 

Static Private Attributes

static unsigned constexpr apiVersion = 1
 

Detailed Description

Definition at line 48 of file GRPCServer.h.

Member Typedef Documentation

◆ BindListener

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

Definition at line 75 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 87 of file GRPCServer.h.

◆ Forward

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

Definition at line 92 of file GRPCServer.h.

Constructor & Destructor Documentation

◆ GRPCServerImpl() [1/2]

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

Definition at line 275 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 335 of file GRPCServer.cpp.

◆ start()

bool xrpl::GRPCServerImpl::start ( )

Definition at line 490 of file GRPCServer.cpp.

◆ handleRpcs()

void xrpl::GRPCServerImpl::handleRpcs ( )

Definition at line 357 of file GRPCServer.cpp.

◆ setupListeners()

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

Definition at line 424 of file GRPCServer.cpp.

◆ getEndpoint()

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

Definition at line 518 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.

◆ journal_

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

Definition at line 69 of file GRPCServer.h.

◆ apiVersion

unsigned constexpr xrpl::GRPCServerImpl::apiVersion = 1
staticconstexprprivate

Definition at line 89 of file GRPCServer.h.