Sanity and build fixes

pull/19435/head
Moiz Haidry 6 years ago
parent 63083d4472
commit fbd5957ee8
  1. 27
      include/grpcpp/impl/codegen/async_stream.h
  2. 7
      include/grpcpp/impl/codegen/async_unary_call.h
  3. 6
      include/grpcpp/impl/codegen/method_handler_impl.h
  4. 4
      include/grpcpp/impl/codegen/sync_stream.h
  5. 20
      include/grpcpp/server_impl.h
  6. 2
      test/cpp/codegen/compiler_test_golden
  7. 2
      test/cpp/qps/server.h
  8. 7
      test/cpp/util/create_test_channel.h

@ -181,8 +181,8 @@ class ClientAsyncReaderFactory {
static ClientAsyncReader<R>* Create(ChannelInterface* channel,
CompletionQueue* cq,
const ::grpc::internal::RpcMethod& method,
::grpc_impl::ClientContext* context, const W& request,
bool start, void* tag) {
::grpc_impl::ClientContext* context,
const W& request, bool start, void* tag) {
::grpc::internal::Call call = channel->CreateCall(method, context, cq);
return new (g_core_codegen_interface->grpc_call_arena_alloc(
call.call(), sizeof(ClientAsyncReader<R>)))
@ -260,8 +260,9 @@ class ClientAsyncReader final : public ClientAsyncReaderInterface<R> {
private:
friend class internal::ClientAsyncReaderFactory<R>;
template <class W>
ClientAsyncReader(::grpc::internal::Call call, ::grpc_impl::ClientContext* context,
const W& request, bool start, void* tag)
ClientAsyncReader(::grpc::internal::Call call,
::grpc_impl::ClientContext* context, const W& request,
bool start, void* tag)
: context_(context), call_(call), started_(start) {
// TODO(ctiller): don't assert
GPR_CODEGEN_ASSERT(init_ops_.SendMessage(request).ok());
@ -329,8 +330,8 @@ class ClientAsyncWriterFactory {
static ClientAsyncWriter<W>* Create(ChannelInterface* channel,
CompletionQueue* cq,
const ::grpc::internal::RpcMethod& method,
::grpc_impl::ClientContext* context, R* response,
bool start, void* tag) {
::grpc_impl::ClientContext* context,
R* response, bool start, void* tag) {
::grpc::internal::Call call = channel->CreateCall(method, context, cq);
return new (g_core_codegen_interface->grpc_call_arena_alloc(
call.call(), sizeof(ClientAsyncWriter<W>)))
@ -426,8 +427,9 @@ class ClientAsyncWriter final : public ClientAsyncWriterInterface<W> {
private:
friend class internal::ClientAsyncWriterFactory<W>;
template <class R>
ClientAsyncWriter(::grpc::internal::Call call, ::grpc_impl::ClientContext* context,
R* response, bool start, void* tag)
ClientAsyncWriter(::grpc::internal::Call call,
::grpc_impl::ClientContext* context, R* response,
bool start, void* tag)
: context_(context), call_(call), started_(start) {
finish_ops_.RecvMessage(response);
finish_ops_.AllowNoMessage();
@ -493,8 +495,8 @@ class ClientAsyncReaderWriterFactory {
/// used to send to the server when starting the call.
static ClientAsyncReaderWriter<W, R>* Create(
ChannelInterface* channel, CompletionQueue* cq,
const ::grpc::internal::RpcMethod& method, ::grpc_impl::ClientContext* context,
bool start, void* tag) {
const ::grpc::internal::RpcMethod& method,
::grpc_impl::ClientContext* context, bool start, void* tag) {
::grpc::internal::Call call = channel->CreateCall(method, context, cq);
return new (g_core_codegen_interface->grpc_call_arena_alloc(
@ -599,8 +601,9 @@ class ClientAsyncReaderWriter final
private:
friend class internal::ClientAsyncReaderWriterFactory<W, R>;
ClientAsyncReaderWriter(::grpc::internal::Call call, ::grpc_impl::ClientContext* context,
bool start, void* tag)
ClientAsyncReaderWriter(::grpc::internal::Call call,
::grpc_impl::ClientContext* context, bool start,
void* tag)
: context_(context), call_(call), started_(start) {
if (start) {
StartCallInternal(tag);

@ -81,8 +81,8 @@ class ClientAsyncResponseReaderFactory {
template <class W>
static ClientAsyncResponseReader<R>* Create(
ChannelInterface* channel, ::grpc_impl::CompletionQueue* cq,
const ::grpc::internal::RpcMethod& method, ::grpc_impl::ClientContext* context,
const W& request, bool start) {
const ::grpc::internal::RpcMethod& method,
::grpc_impl::ClientContext* context, const W& request, bool start) {
::grpc::internal::Call call = channel->CreateCall(method, context, cq);
return new (g_core_codegen_interface->grpc_call_arena_alloc(
call.call(), sizeof(ClientAsyncResponseReader<R>)))
@ -162,7 +162,8 @@ class ClientAsyncResponseReader final
bool initial_metadata_read_ = false;
template <class W>
ClientAsyncResponseReader(::grpc::internal::Call call, ::grpc_impl::ClientContext* context,
ClientAsyncResponseReader(::grpc::internal::Call call,
::grpc_impl::ClientContext* context,
const W& request, bool start)
: context_(context), call_(call), started_(start) {
// Bind the metadata at time of StartCallInternal but set up the rest here

@ -54,9 +54,9 @@ class RpcMethodHandler : public MethodHandler {
public:
RpcMethodHandler(
std::function<Status(ServiceType*, ::grpc_impl::ServerContext*,
const RequestType*, ResponseType*)>
func,
ServiceType* service)
const RequestType*, ResponseType*)>
func,
ServiceType* service)
: func_(func), service_(service) {}
void RunHandler(const HandlerParameter& param) final {

@ -120,7 +120,7 @@ class WriterInterface {
///
/// \param msg The message to be written to the stream.
///
/// \return \a true on success, \a false when the stream has been closed.access/marconi/common/grpc/async_grpc_container.h
/// \return \a true on success, \a false when the stream has been closed.
inline bool Write(const W& msg) { return Write(msg, WriteOptions()); }
/// Write \a msg and coalesce it with the writing of trailing metadata, using
@ -142,7 +142,7 @@ class WriterInterface {
}
};
} // namespace internalaccess/marconi/common/grpc/async_grpc_container.h
} // namespace internal
/// Client-side interface for streaming reads of message of type \a R.
template <class R>

@ -183,16 +183,16 @@ class Server : public grpc::ServerInterface, private grpc::GrpcLibraryCodegen {
/// server completion queues passed via sync_server_cqs param.
Server(int max_message_size, ChannelArguments* args,
std::shared_ptr<std::vector<std::unique_ptr<ServerCompletionQueue>>>
sync_server_cqs,
int min_pollers, int max_pollers, int sync_cq_timeout_msec,
std::vector<
std::shared_ptr<grpc::internal::ExternalConnectionAcceptorImpl>>
acceptors,
grpc_resource_quota* server_rq = nullptr,
std::vector<std::unique_ptr<
grpc::experimental::ServerInterceptorFactoryInterface>>
interceptor_creators = std::vector<std::unique_ptr<
grpc::experimental::ServerInterceptorFactoryInterface>>());
sync_server_cqs,
int min_pollers, int max_pollers, int sync_cq_timeout_msec,
std::vector<
std::shared_ptr<grpc::internal::ExternalConnectionAcceptorImpl>>
acceptors,
grpc_resource_quota* server_rq = nullptr,
std::vector<std::unique_ptr<
grpc::experimental::ServerInterceptorFactoryInterface>>
interceptor_creators = std::vector<std::unique_ptr<
grpc::experimental::ServerInterceptorFactoryInterface>>());
/// Start the server.
///

@ -31,10 +31,12 @@
#include <grpcpp/impl/codegen/async_stream.h>
#include <grpcpp/impl/codegen/async_unary_call.h>
#include <grpcpp/impl/codegen/client_callback.h>
#include <grpcpp/impl/codegen/client_context.h>
#include <grpcpp/impl/codegen/method_handler_impl.h>
#include <grpcpp/impl/codegen/proto_utils.h>
#include <grpcpp/impl/codegen/rpc_method.h>
#include <grpcpp/impl/codegen/server_callback.h>
#include <grpcpp/impl/codegen/server_context.h>
#include <grpcpp/impl/codegen/service_type.h>
#include <grpcpp/impl/codegen/status.h>
#include <grpcpp/impl/codegen/stub_options.h>

@ -19,9 +19,9 @@
#ifndef TEST_QPS_SERVER_H
#define TEST_QPS_SERVER_H
#include <grpcpp/channel.h>
#include <grpc/support/cpu.h>
#include <grpc/support/log.h>
#include <grpcpp/channel.h>
#include <grpcpp/resource_quota.h>
#include <grpcpp/security/server_credentials.h>
#include <grpcpp/server_builder.h>

@ -26,7 +26,6 @@
#include <grpcpp/security/credentials.h>
#include <grpcpp/support/channel_arguments.h>
namespace grpc_impl {
class Channel;
@ -79,8 +78,7 @@ std::shared_ptr<Channel> CreateTestChannel(
std::shared_ptr<Channel> CreateTestChannel(
const grpc::string& server, const grpc::string& override_hostname,
testing::transport_security security_type, bool use_prod_roots,
const std::shared_ptr<CallCredentials>& creds,
const ChannelArguments& args,
const std::shared_ptr<CallCredentials>& creds, const ChannelArguments& args,
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators);
@ -88,8 +86,7 @@ std::shared_ptr<Channel> CreateTestChannel(
std::shared_ptr<Channel> CreateTestChannel(
const grpc::string& server, const grpc::string& cred_type,
const grpc::string& override_hostname, bool use_prod_roots,
const std::shared_ptr<CallCredentials>& creds,
const ChannelArguments& args,
const std::shared_ptr<CallCredentials>& creds, const ChannelArguments& args,
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators);

Loading…
Cancel
Save