20 #ifndef RIPPLE_CORE_GRPCSERVER_H_INCLUDED
21 #define RIPPLE_CORE_GRPCSERVER_H_INCLUDED
23 #include <ripple/app/main/Application.h>
24 #include <ripple/core/JobQueue.h>
25 #include <ripple/net/InfoSub.h>
26 #include <ripple/protocol/ErrorCodes.h>
27 #include <ripple/resource/Charge.h>
28 #include <ripple/rpc/Context.h>
29 #include <ripple/rpc/GRPCHandlers.h>
30 #include <ripple/rpc/Role.h>
31 #include <ripple/rpc/impl/Handler.h>
32 #include <ripple/rpc/impl/RPCHelpers.h>
33 #include <ripple/rpc/impl/Tuning.h>
35 #include "org/xrpl/rpc/v1/xrp_ledger.grpc.pb.h"
36 #include <grpcpp/grpcpp.h>
80 org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService
service_;
93 template <
class Request,
class Response>
95 org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService&,
98 grpc::ServerAsyncResponseWriter<Response>*,
99 grpc::CompletionQueue*,
100 grpc::ServerCompletionQueue*,
105 template <
class Request,
class Response>
135 template <
class Request,
class Response>
143 org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService&
service_;
146 grpc::ServerCompletionQueue&
cq_;
190 org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService& service,
191 grpc::ServerCompletionQueue& cq,
std::shared_ptr< Processor > clone() override
CallData & operator=(const CallData &)=delete
org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService service_
std::vector< std::shared_ptr< Processor > > requests_
grpc::ServerCompletionQueue & cq_
RPC::Condition requiredCondition_
std::unique_ptr< grpc::Server > server_
virtual bool isFinished() override
std::atomic_bool finished_
Handler< Request, Response > handler_
virtual bool isFinished()=0
org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService & service_
std::unique_ptr< grpc::ServerCompletionQueue > cq_
Resource::Consumer getUsage()
GRPCServer & operator=(const GRPCServer &)=delete
Processor & operator=(const Processor &)=delete
GRPCServerImpl & operator=(const GRPCServerImpl &)=delete
GRPCServerImpl(Application &app)
A generic endpoint for log messages.
Resource::Charge getLoadType()
BindListener< Request, Response > bindListener_
Resource::Charge loadType_
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::vector< std::shared_ptr< Processor > > setupListeners()
An endpoint that consumes resources.
virtual std::shared_ptr< Processor > clone()=0
GRPCServer(Application &app)
virtual ~CallData()=default
virtual ~Processor()=default
Role
Indicates the level of administrative permission to grant.
CallData(org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService &service, grpc::ServerCompletionQueue &cq, Application &app, BindListener< Request, Response > bindListener, Handler< Request, Response > handler, RPC::Condition requiredCondition, Resource::Charge loadType)
virtual void process() override
std::string serverAddress_
grpc::ServerAsyncResponseWriter< Response > responder_