rippled
Classes | Public Member Functions | Private Types | Private Attributes | Static Private Attributes | List of all members
ripple::GRPCServerImpl Class Referencefinal
Collaboration diagram for ripple::GRPCServerImpl:
Collaboration graph
[legend]

Classes

class  CallData
 

Public Member Functions

 GRPCServerImpl (Application &app)
 
 GRPCServerImpl (const GRPCServerImpl &)=delete
 
GRPCServerImploperator= (const GRPCServerImpl &)=delete
 
void shutdown ()
 
bool start ()
 
void handleRpcs ()
 
std::vector< std::shared_ptr< Processor > > setupListeners ()
 

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::vector< boost::asio::ip::address > secureGatewayIPs_
 
beast::Journal journal_
 

Static Private Attributes

static constexpr unsigned apiVersion = 1
 

Detailed Description

Definition at line 70 of file GRPCServer.h.

Member Typedef Documentation

◆ BindListener

template<class Request , class Response >
using ripple::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 103 of file GRPCServer.h.

◆ Handler

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

Definition at line 109 of file GRPCServer.h.

◆ Forward

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

Definition at line 118 of file GRPCServer.h.

Constructor & Destructor Documentation

◆ GRPCServerImpl() [1/2]

ripple::GRPCServerImpl::GRPCServerImpl ( Application app)
explicit

Definition at line 426 of file GRPCServer.cpp.

◆ GRPCServerImpl() [2/2]

ripple::GRPCServerImpl::GRPCServerImpl ( const GRPCServerImpl )
delete

Member Function Documentation

◆ operator=()

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

◆ shutdown()

void ripple::GRPCServerImpl::shutdown ( )

Definition at line 492 of file GRPCServer.cpp.

◆ start()

bool ripple::GRPCServerImpl::start ( )

Definition at line 665 of file GRPCServer.cpp.

◆ handleRpcs()

void ripple::GRPCServerImpl::handleRpcs ( )

Definition at line 514 of file GRPCServer.cpp.

◆ setupListeners()

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

Definition at line 585 of file GRPCServer.cpp.

Member Data Documentation

◆ cq_

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

Definition at line 75 of file GRPCServer.h.

◆ requests_

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

Definition at line 77 of file GRPCServer.h.

◆ service_

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

Definition at line 80 of file GRPCServer.h.

◆ server_

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

Definition at line 82 of file GRPCServer.h.

◆ app_

Application& ripple::GRPCServerImpl::app_
private

Definition at line 84 of file GRPCServer.h.

◆ serverAddress_

std::string ripple::GRPCServerImpl::serverAddress_
private

Definition at line 86 of file GRPCServer.h.

◆ secureGatewayIPs_

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

Definition at line 88 of file GRPCServer.h.

◆ journal_

beast::Journal ripple::GRPCServerImpl::journal_
private

Definition at line 90 of file GRPCServer.h.

◆ apiVersion

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

Definition at line 111 of file GRPCServer.h.