xrpld
Loading...
Searching...
No Matches
GRPCHandlers.h
1#pragma once
2
3#include <xrpld/rpc/Context.h>
4
5#include <grpcpp/support/status.h>
6#include <org/xrpl/rpc/v1/get_ledger.pb.h>
7#include <org/xrpl/rpc/v1/get_ledger_data.pb.h>
8#include <org/xrpl/rpc/v1/get_ledger_diff.pb.h>
9#include <org/xrpl/rpc/v1/get_ledger_entry.pb.h>
10
11#include <utility>
12
13namespace xrpl {
14
15/*
16 * These handlers are for gRPC. They each take in a protobuf message that is
17 * nested inside rpc::GRPCContext<T>, where T is the request type
18 * The return value is the response type, as well as a status
19 * If the status is not Status::OK (meaning an error occurred), then only
20 * the status will be sent to the client, and the response will be omitted
21 */
22
23std::pair<org::xrpl::rpc::v1::GetLedgerResponse, grpc::Status>
25
26std::pair<org::xrpl::rpc::v1::GetLedgerEntryResponse, grpc::Status>
28
29std::pair<org::xrpl::rpc::v1::GetLedgerDataResponse, grpc::Status>
31
32std::pair<org::xrpl::rpc::v1::GetLedgerDiffResponse, grpc::Status>
34
35} // namespace xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
std::pair< org::xrpl::rpc::v1::GetLedgerDataResponse, grpc::Status > doLedgerDataGrpc(rpc::GRPCContext< org::xrpl::rpc::v1::GetLedgerDataRequest > &context)
std::pair< org::xrpl::rpc::v1::GetLedgerDiffResponse, grpc::Status > doLedgerDiffGrpc(rpc::GRPCContext< org::xrpl::rpc::v1::GetLedgerDiffRequest > &context)
std::pair< org::xrpl::rpc::v1::GetLedgerEntryResponse, grpc::Status > doLedgerEntryGrpc(rpc::GRPCContext< org::xrpl::rpc::v1::GetLedgerEntryRequest > &context)
std::pair< org::xrpl::rpc::v1::GetLedgerResponse, grpc::Status > doLedgerGrpc(rpc::GRPCContext< org::xrpl::rpc::v1::GetLedgerRequest > &context)