Line data Source code
1 : // Generated by the gRPC protobuf plugin.
2 : // If you make any local change, they will be lost.
3 : // source: test/cpp/qps/perf_db.proto
4 :
5 : #include "test/cpp/qps/perf_db.pb.h"
6 : #include "test/cpp/qps/perf_db.grpc.pb.h"
7 :
8 : #include <grpc++/channel.h>
9 : #include <grpc++/impl/client_unary_call.h>
10 : #include <grpc++/impl/rpc_service_method.h>
11 : #include <grpc++/impl/service_type.h>
12 : #include <grpc++/support/async_unary_call.h>
13 : #include <grpc++/support/async_stream.h>
14 : #include <grpc++/support/sync_stream.h>
15 : namespace grpc {
16 : namespace testing {
17 :
18 : static const char* PerfDbTransfer_method_names[] = {
19 : "/grpc.testing.PerfDbTransfer/RecordSingleClientData",
20 : };
21 :
22 0 : std::unique_ptr< PerfDbTransfer::Stub> PerfDbTransfer::NewStub(const std::shared_ptr< ::grpc::Channel>& channel, const ::grpc::StubOptions& options) {
23 0 : std::unique_ptr< PerfDbTransfer::Stub> stub(new PerfDbTransfer::Stub(channel));
24 0 : return stub;
25 : }
26 :
27 0 : PerfDbTransfer::Stub::Stub(const std::shared_ptr< ::grpc::Channel>& channel)
28 0 : : channel_(channel), rpcmethod_RecordSingleClientData_(PerfDbTransfer_method_names[0], ::grpc::RpcMethod::NORMAL_RPC, channel)
29 0 : {}
30 :
31 0 : ::grpc::Status PerfDbTransfer::Stub::RecordSingleClientData(::grpc::ClientContext* context, const ::grpc::testing::SingleUserRecordRequest& request, ::grpc::testing::SingleUserRecordReply* response) {
32 0 : return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_RecordSingleClientData_, context, request, response);
33 : }
34 :
35 0 : ::grpc::ClientAsyncResponseReader< ::grpc::testing::SingleUserRecordReply>* PerfDbTransfer::Stub::AsyncRecordSingleClientDataRaw(::grpc::ClientContext* context, const ::grpc::testing::SingleUserRecordRequest& request, ::grpc::CompletionQueue* cq) {
36 0 : return new ::grpc::ClientAsyncResponseReader< ::grpc::testing::SingleUserRecordReply>(channel_.get(), cq, rpcmethod_RecordSingleClientData_, context, request);
37 : }
38 :
39 0 : PerfDbTransfer::AsyncService::AsyncService() : ::grpc::AsynchronousService(PerfDbTransfer_method_names, 1) {}
40 :
41 0 : PerfDbTransfer::Service::~Service() {
42 0 : delete service_;
43 0 : }
44 :
45 0 : ::grpc::Status PerfDbTransfer::Service::RecordSingleClientData(::grpc::ServerContext* context, const ::grpc::testing::SingleUserRecordRequest* request, ::grpc::testing::SingleUserRecordReply* response) {
46 : (void) context;
47 : (void) request;
48 : (void) response;
49 0 : return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
50 : }
51 :
52 0 : void PerfDbTransfer::AsyncService::RequestRecordSingleClientData(::grpc::ServerContext* context, ::grpc::testing::SingleUserRecordRequest* request, ::grpc::ServerAsyncResponseWriter< ::grpc::testing::SingleUserRecordReply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
53 0 : AsynchronousService::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
54 0 : }
55 :
56 0 : ::grpc::RpcService* PerfDbTransfer::Service::service() {
57 0 : if (service_ != nullptr) {
58 0 : return service_;
59 : }
60 0 : service_ = new ::grpc::RpcService();
61 : service_->AddMethod(new ::grpc::RpcServiceMethod(
62 : PerfDbTransfer_method_names[0],
63 : ::grpc::RpcMethod::NORMAL_RPC,
64 : new ::grpc::RpcMethodHandler< PerfDbTransfer::Service, ::grpc::testing::SingleUserRecordRequest, ::grpc::testing::SingleUserRecordReply>(
65 0 : std::mem_fn(&PerfDbTransfer::Service::RecordSingleClientData), this)));
66 0 : return service_;
67 : }
68 :
69 :
70 : } // namespace grpc
71 : } // namespace testing
72 :
|