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

#include <GRPCServer.h>

Collaboration diagram for ripple::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 68 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 95 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 107 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 113 of file GRPCServer.h.

Constructor & Destructor Documentation

◆ GRPCServerImpl() [1/2]

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

Definition at line 319 of file GRPCServer.cpp.

◆ GRPCServerImpl() [2/2]

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

Member Function Documentation

◆ operator=()

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

◆ shutdown()

void ripple::GRPCServerImpl::shutdown ( )

Definition at line 385 of file GRPCServer.cpp.

◆ start()

bool ripple::GRPCServerImpl::start ( )

Definition at line 558 of file GRPCServer.cpp.

◆ handleRpcs()

void ripple::GRPCServerImpl::handleRpcs ( )

Definition at line 407 of file GRPCServer.cpp.

◆ setupListeners()

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

Definition at line 478 of file GRPCServer.cpp.

◆ getEndpoint()

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

Definition at line 587 of file GRPCServer.cpp.

Member Data Documentation

◆ cq_

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

Definition at line 73 of file GRPCServer.h.

◆ requests_

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

Definition at line 75 of file GRPCServer.h.

◆ service_

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

Definition at line 78 of file GRPCServer.h.

◆ server_

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

Definition at line 80 of file GRPCServer.h.

◆ app_

Application& ripple::GRPCServerImpl::app_
private

Definition at line 82 of file GRPCServer.h.

◆ serverAddress_

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

Definition at line 84 of file GRPCServer.h.

◆ serverPort_

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

Definition at line 85 of file GRPCServer.h.

◆ secureGatewayIPs_

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

Definition at line 87 of file GRPCServer.h.

◆ journal_

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

Definition at line 89 of file GRPCServer.h.

◆ apiVersion

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

Definition at line 110 of file GRPCServer.h.