2016-06-03 19:34:09 +02:00
|
|
|
// Generated by the gRPC protobuf plugin.
|
|
|
|
// If you make any local change, they will be lost.
|
|
|
|
// source: echo.proto
|
|
|
|
|
|
|
|
#include "echo.pb.h"
|
|
|
|
#include "echo.grpc.pb.h"
|
|
|
|
|
|
|
|
#include <grpc++/impl/codegen/async_stream.h>
|
|
|
|
#include <grpc++/impl/codegen/async_unary_call.h>
|
|
|
|
#include <grpc++/impl/codegen/channel_interface.h>
|
|
|
|
#include <grpc++/impl/codegen/client_unary_call.h>
|
|
|
|
#include <grpc++/impl/codegen/method_handler_impl.h>
|
|
|
|
#include <grpc++/impl/codegen/rpc_service_method.h>
|
|
|
|
#include <grpc++/impl/codegen/service_type.h>
|
|
|
|
#include <grpc++/impl/codegen/sync_stream.h>
|
|
|
|
namespace echo {
|
|
|
|
|
|
|
|
static const char* Echo_method_names[] = {
|
|
|
|
"/echo.Echo/DoEcho",
|
|
|
|
};
|
|
|
|
|
|
|
|
std::unique_ptr< Echo::Stub> Echo::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
|
|
|
|
std::unique_ptr< Echo::Stub> stub(new Echo::Stub(channel));
|
|
|
|
return stub;
|
|
|
|
}
|
|
|
|
|
|
|
|
Echo::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
|
|
|
|
: channel_(channel), rpcmethod_DoEcho_(Echo_method_names[0], ::grpc::RpcMethod::NORMAL_RPC, channel)
|
|
|
|
{}
|
|
|
|
|
|
|
|
::grpc::Status Echo::Stub::DoEcho(::grpc::ClientContext* context, const ::echo::EchoRequest& request, ::echo::EchoRequest* response) {
|
|
|
|
return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_DoEcho_, context, request, response);
|
|
|
|
}
|
|
|
|
|
|
|
|
::grpc::ClientAsyncResponseReader< ::echo::EchoRequest>* Echo::Stub::AsyncDoEchoRaw(::grpc::ClientContext* context, const ::echo::EchoRequest& request, ::grpc::CompletionQueue* cq) {
|
|
|
|
return new ::grpc::ClientAsyncResponseReader< ::echo::EchoRequest>(channel_.get(), cq, rpcmethod_DoEcho_, context, request);
|
|
|
|
}
|
|
|
|
|
|
|
|
Echo::Service::Service() {
|
Joel/highlevelv2 (#40)
* Tweak runOps param order, inline common op sequences, clean up serverHandleNormalCall
* More ops sequence inlining for clarity, experimenting with Managed
* Checkpoint: preliminary support for all streaming modes; much cleanup/refactoring and api design still needed
* Use mempty for default StatusDetails; tweak bad status matching mechanism
* Preliminary user-facing, server-streaming, low-level api and test
* renaming wibbles
* Preliminary user-facing, client-streaming, low-level api and test
* Move sendMsgs comb to Network.GRPC.LowLevel.Op; misc cleanup/DCR
* Modify bidi streaming to omit request payload
* Add transformers dep
* Preliminary user-facing low-level bidirectional streaming api and test
* Fix missing peek import
* Remove TimeoutSeconds params on streaming mode functions
* Fix serverHandleNormalCall rebase wart
* Fix rebase warts; minor hlint fixes and wibbles
* Post-rebase tweaks to optional payload use in serverRequestCall (i.e., now respects payloadHandling again)
* Cleanup/refactor serverRequestCall
* Fix comment
* Change ServerRWHandler type so that handler does not have to invoke a finalizer
* Change ServerReaderHandler type so that handler does not have to invoke a finalizer
* Simplify serverWriter interface and ServerWriterHandler structure
* Simplify serverRW (get rid of exec param), improve bidi streaming tests
* Use ExceptT in serverRW impl
* Change ServerRWHandler type to pass recv/send operations.
* Renaming
* Define ClientRWHandler, pass recv/send ops
* wibbles
* Use ExceptT in clientRW impl
* Add DataKinded phantom typing to RegisteredMethod; misc cleanup
* Simplify sendMsgs interface; add SingleSend type and related helpers
* Rename SingleSend to SendSingle, use ExceptT to clean up {client,server}Writer and sendMsgs
* More ExceptT cleanup in clientWriter
* Factor out reusable bits of clientWriter
* Shrink ServerReaderHandler
* Delete stale comments
* begin high-level server interface
* update to datakind representation
* clean up
* move method type info to type level, parametrize ServerCall by payload
* convert for writer handler
* start switching over to Message-based handlers
* begin work on highlevel example
* comment out old code
* parametrize StreamSend
* parametrize StreamRecv
* conversion for ServerReaderHandler
* finish handler conversions
* Add high level version and payload checking to echo-client
* Decouple server CQs from call-bound CQs (registered methods); use more consistent naming conventions
* Decouple server/call-bound CQs for unregistered methods; refactor U.serverRequestCall; misc cleanup
* Make convertRecv total; formatting wibbles
2016-07-12 20:28:21 +02:00
|
|
|
(void)Echo_method_names;
|
2016-06-03 19:34:09 +02:00
|
|
|
AddMethod(new ::grpc::RpcServiceMethod(
|
|
|
|
Echo_method_names[0],
|
|
|
|
::grpc::RpcMethod::NORMAL_RPC,
|
|
|
|
new ::grpc::RpcMethodHandler< Echo::Service, ::echo::EchoRequest, ::echo::EchoRequest>(
|
|
|
|
std::mem_fn(&Echo::Service::DoEcho), this)));
|
|
|
|
}
|
|
|
|
|
|
|
|
Echo::Service::~Service() {
|
|
|
|
}
|
|
|
|
|
|
|
|
::grpc::Status Echo::Service::DoEcho(::grpc::ServerContext* context, const ::echo::EchoRequest* request, ::echo::EchoRequest* response) {
|
|
|
|
(void) context;
|
|
|
|
(void) request;
|
|
|
|
(void) response;
|
|
|
|
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Joel/highlevelv2 (#40)
* Tweak runOps param order, inline common op sequences, clean up serverHandleNormalCall
* More ops sequence inlining for clarity, experimenting with Managed
* Checkpoint: preliminary support for all streaming modes; much cleanup/refactoring and api design still needed
* Use mempty for default StatusDetails; tweak bad status matching mechanism
* Preliminary user-facing, server-streaming, low-level api and test
* renaming wibbles
* Preliminary user-facing, client-streaming, low-level api and test
* Move sendMsgs comb to Network.GRPC.LowLevel.Op; misc cleanup/DCR
* Modify bidi streaming to omit request payload
* Add transformers dep
* Preliminary user-facing low-level bidirectional streaming api and test
* Fix missing peek import
* Remove TimeoutSeconds params on streaming mode functions
* Fix serverHandleNormalCall rebase wart
* Fix rebase warts; minor hlint fixes and wibbles
* Post-rebase tweaks to optional payload use in serverRequestCall (i.e., now respects payloadHandling again)
* Cleanup/refactor serverRequestCall
* Fix comment
* Change ServerRWHandler type so that handler does not have to invoke a finalizer
* Change ServerReaderHandler type so that handler does not have to invoke a finalizer
* Simplify serverWriter interface and ServerWriterHandler structure
* Simplify serverRW (get rid of exec param), improve bidi streaming tests
* Use ExceptT in serverRW impl
* Change ServerRWHandler type to pass recv/send operations.
* Renaming
* Define ClientRWHandler, pass recv/send ops
* wibbles
* Use ExceptT in clientRW impl
* Add DataKinded phantom typing to RegisteredMethod; misc cleanup
* Simplify sendMsgs interface; add SingleSend type and related helpers
* Rename SingleSend to SendSingle, use ExceptT to clean up {client,server}Writer and sendMsgs
* More ExceptT cleanup in clientWriter
* Factor out reusable bits of clientWriter
* Shrink ServerReaderHandler
* Delete stale comments
* begin high-level server interface
* update to datakind representation
* clean up
* move method type info to type level, parametrize ServerCall by payload
* convert for writer handler
* start switching over to Message-based handlers
* begin work on highlevel example
* comment out old code
* parametrize StreamSend
* parametrize StreamRecv
* conversion for ServerReaderHandler
* finish handler conversions
* Add high level version and payload checking to echo-client
* Decouple server CQs from call-bound CQs (registered methods); use more consistent naming conventions
* Decouple server/call-bound CQs for unregistered methods; refactor U.serverRequestCall; misc cleanup
* Make convertRecv total; formatting wibbles
2016-07-12 20:28:21 +02:00
|
|
|
static const char* Add_method_names[] = {
|
|
|
|
"/echo.Add/DoAdd",
|
|
|
|
};
|
|
|
|
|
|
|
|
std::unique_ptr< Add::Stub> Add::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
|
|
|
|
std::unique_ptr< Add::Stub> stub(new Add::Stub(channel));
|
|
|
|
return stub;
|
|
|
|
}
|
|
|
|
|
|
|
|
Add::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
|
|
|
|
: channel_(channel), rpcmethod_DoAdd_(Add_method_names[0], ::grpc::RpcMethod::NORMAL_RPC, channel)
|
|
|
|
{}
|
|
|
|
|
|
|
|
::grpc::Status Add::Stub::DoAdd(::grpc::ClientContext* context, const ::echo::AddRequest& request, ::echo::AddResponse* response) {
|
|
|
|
return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_DoAdd_, context, request, response);
|
|
|
|
}
|
|
|
|
|
|
|
|
::grpc::ClientAsyncResponseReader< ::echo::AddResponse>* Add::Stub::AsyncDoAddRaw(::grpc::ClientContext* context, const ::echo::AddRequest& request, ::grpc::CompletionQueue* cq) {
|
|
|
|
return new ::grpc::ClientAsyncResponseReader< ::echo::AddResponse>(channel_.get(), cq, rpcmethod_DoAdd_, context, request);
|
|
|
|
}
|
|
|
|
|
|
|
|
Add::Service::Service() {
|
|
|
|
(void)Add_method_names;
|
|
|
|
AddMethod(new ::grpc::RpcServiceMethod(
|
|
|
|
Add_method_names[0],
|
|
|
|
::grpc::RpcMethod::NORMAL_RPC,
|
|
|
|
new ::grpc::RpcMethodHandler< Add::Service, ::echo::AddRequest, ::echo::AddResponse>(
|
|
|
|
std::mem_fn(&Add::Service::DoAdd), this)));
|
|
|
|
}
|
|
|
|
|
|
|
|
Add::Service::~Service() {
|
|
|
|
}
|
|
|
|
|
|
|
|
::grpc::Status Add::Service::DoAdd(::grpc::ServerContext* context, const ::echo::AddRequest* request, ::echo::AddResponse* response) {
|
|
|
|
(void) context;
|
|
|
|
(void) request;
|
|
|
|
(void) response;
|
|
|
|
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-06-03 19:34:09 +02:00
|
|
|
} // namespace echo
|
|
|
|
|