GRPC C++  1.34.0
Data Structures | Typedefs | Functions | Variables
grpc::internal Namespace Reference

Models a gRPC server. More...

Data Structures

class  AsyncReaderInterface
 An interface that yields a sequence of messages of type R. More...
 
class  AsyncWriterInterface
 An interface that can be fed a sequence of messages of type W. More...
 
class  BidiStreamingHandler
 
class  BlockingUnaryCallImpl
 
class  Call
 Straightforward wrapping of the C call object. More...
 
class  CallbackBidiHandler
 
class  CallbackClientStreamingHandler
 
class  CallbackServerStreamingHandler
 
class  CallbackUnaryCallImpl
 
class  CallbackUnaryHandler
 
class  CallbackWithStatusTag
 
class  CallbackWithSuccessTag
 CallbackWithSuccessTag can be reused multiple times, and will be used in this fashion for streaming operations. More...
 
class  CallHook
 This is an interface that Channel and Server implement to allow them to hook performing ops. More...
 
class  CallNoOp
 Default argument for CallOpSet. More...
 
class  CallOpClientRecvStatus
 
class  CallOpClientSendClose
 
class  CallOpGenericRecvMessage
 
class  CallOpRecvInitialMetadata
 
class  CallOpRecvMessage
 
class  CallOpSendInitialMetadata
 
class  CallOpSendMessage
 
class  CallOpServerSendStatus
 
class  CallOpSet
 Primary implementation of CallOpSetInterface. More...
 
class  CallOpSetInterface
 An abstract collection of call ops, used to generate the grpc_call_op structure to pass down to the lower layers, and as it is-a CompletionQueueTag, also massages the final completion into the correct form for consumption in the C++ API. More...
 
class  CancelInterceptorBatchMethods
 
class  ClientAsyncReaderFactory
 
class  ClientAsyncReaderWriterFactory
 
class  ClientAsyncResponseReaderFactory
 
class  ClientAsyncResponseReaderHelper
 
class  ClientAsyncStreamingInterface
 Common interface for all client side asynchronous streaming. More...
 
class  ClientAsyncWriterFactory
 
class  ClientCallbackReaderFactory
 
class  ClientCallbackReaderImpl
 
class  ClientCallbackReaderWriterFactory
 
class  ClientCallbackReaderWriterImpl
 
class  ClientCallbackUnaryFactory
 
class  ClientCallbackUnaryImpl
 
class  ClientCallbackWriterFactory
 
class  ClientCallbackWriterImpl
 
class  ClientReactor
 
class  ClientReaderFactory
 
class  ClientReaderWriterFactory
 
class  ClientStreamingHandler
 A wrapper class of an application provided client streaming handler. More...
 
class  ClientStreamingInterface
 Common interface for all synchronous client side streaming. More...
 
class  ClientWriterFactory
 
class  CompletionQueueTag
 An interface allowing implementors to process and filter event tags. More...
 
class  CondVar
 
class  DefaultMessageHolder
 
class  DeserializeFunc
 
class  DeserializeFuncType
 
class  ErrorMethodHandler
 General method handler class for errors that prevent real method use e.g., handle unknown method by returning UNIMPLEMENTED error. More...
 
class  FinishOnlyReactor
 
class  GrpcLibrary
 
class  GrpcLibraryInitializer
 Instantiating this class ensures the proper initialization of gRPC. More...
 
class  InterceptedChannel
 An InterceptedChannel is available to client Interceptors. More...
 
class  InterceptorBatchMethodsImpl
 
class  MetadataMap
 
class  MethodHandler
 Base class for running an RPC handler. More...
 
class  Mutex
 
class  MutexLock
 
class  ReaderInterface
 An interface that yields a sequence of messages of type R. More...
 
class  ReleasableMutexLock
 
class  RpcMethod
 Descriptor of an RPC method. More...
 
class  RpcMethodHandler
 A wrapper class of an application provided rpc method handler. More...
 
class  RpcServiceMethod
 Server side rpc method class. More...
 
class  ServerAsyncStreamingInterface
 
class  ServerCallbackCall
 The base class of ServerCallbackUnary etc. More...
 
class  ServerReactor
 
class  ServerReaderWriterBody
 
class  ServerStreamingHandler
 A wrapper class of an application provided server streaming handler. More...
 
class  ServerStreamingInterface
 Common interface for all synchronous server side streaming. More...
 
class  SplitServerStreamingHandler
 
class  StreamedUnaryHandler
 
class  TemplatedBidiStreamingHandler
 A wrapper class of an application provided bidi-streaming handler. More...
 
class  WriterInterface
 An interface that can be fed a sequence of messages of type W. More...
 

Typedefs

typedef ErrorMethodHandler<::grpc::StatusCode::UNIMPLEMENTED > UnknownMethodHandler
 
typedef ErrorMethodHandler<::grpc::StatusCode::RESOURCE_EXHAUSTED > ResourceExhaustedHandler
 
using UnimplementedUnaryReactor = FinishOnlyReactor< ServerUnaryReactor >
 
template<class Request >
using UnimplementedReadReactor = FinishOnlyReactor< ServerReadReactor< Request > >
 
template<class Response >
using UnimplementedWriteReactor = FinishOnlyReactor< ServerWriteReactor< Response > >
 
template<class Request , class Response >
using UnimplementedBidiReactor = FinishOnlyReactor< ServerBidiReactor< Request, Response > >
 

Functions

template<class RequestType >
void * UnaryDeserializeHelper (grpc_call *call, grpc_byte_buffer *req, ::grpc::Status *status, RequestType *request)
 A helper function with reduced templating to do deserializing. More...
 
grpc_metadataFillMetadataArray (const std::multimap< std::string, std::string > &metadata, size_t *metadata_count, const std::string &optional_error_details)
 
template<class Func , class... Args>
void CatchingCallback (Func &&func, Args &&... args)
 An exception-safe way of invoking a user-specified callback function. More...
 
template<class Reactor , class Func , class... Args>
Reactor * CatchingReactorGetter (Func &&func, Args &&... args)
 
template<class InputMessage , class OutputMessage , class BaseInputMessage = InputMessage, class BaseOutputMessage = OutputMessage>
void CallbackUnaryCall (::grpc::ChannelInterface *channel, const ::grpc::internal::RpcMethod &method, ::grpc::ClientContext *context, const InputMessage *request, OutputMessage *result, std::function< void(::grpc::Status)> on_completion)
 Perform a callback-based unary call. More...
 
template<class InputMessage , class OutputMessage , class BaseInputMessage = InputMessage, class BaseOutputMessage = OutputMessage>
Status BlockingUnaryCall (ChannelInterface *channel, const RpcMethod &method, grpc::ClientContext *context, const InputMessage &request, OutputMessage *result)
 Wrapper that performs a blocking unary call. More...
 
template<class ResponseType >
void UnaryRunHandlerHelper (const ::grpc::internal::MethodHandler::HandlerParameter &, ResponseType *, ::grpc::Status &)
 
template<class Callable >
::grpc::Status CatchingFunctionHandler (Callable &&handler)
 
template<class ResponseType >
void UnaryRunHandlerHelper (const MethodHandler::HandlerParameter &param, ResponseType *rsp, ::grpc::Status &status)
 A helper function with reduced templating to do the common work needed to actually send the server response. More...
 
template<class ResponseType >
void UnaryRunHandlerHelper (const MethodHandler::HandlerParameter &, ResponseType *, Status &)
 

Variables

experimental::ClientInterceptorFactoryInterfaceg_global_client_interceptor_factory
 
const char kBinaryErrorDetailsKey [] = "grpc-status-details-bin"
 

Detailed Description

Models a gRPC server.

Actual implementation of bi-directional streaming.

Servers are configured and started via grpc::ServerBuilder.

Typedef Documentation

◆ ResourceExhaustedHandler

typedef ErrorMethodHandler<::grpc::StatusCode::RESOURCE_EXHAUSTED> grpc::internal::ResourceExhaustedHandler

◆ UnimplementedBidiReactor

template<class Request , class Response >
using grpc::internal::UnimplementedBidiReactor = typedef FinishOnlyReactor<ServerBidiReactor<Request, Response> >

◆ UnimplementedReadReactor

template<class Request >
using grpc::internal::UnimplementedReadReactor = typedef FinishOnlyReactor<ServerReadReactor<Request> >

◆ UnimplementedUnaryReactor

◆ UnimplementedWriteReactor

template<class Response >
using grpc::internal::UnimplementedWriteReactor = typedef FinishOnlyReactor<ServerWriteReactor<Response> >

◆ UnknownMethodHandler

typedef ErrorMethodHandler<::grpc::StatusCode::UNIMPLEMENTED> grpc::internal::UnknownMethodHandler

Function Documentation

◆ BlockingUnaryCall()

template<class InputMessage , class OutputMessage , class BaseInputMessage = InputMessage, class BaseOutputMessage = OutputMessage>
Status grpc::internal::BlockingUnaryCall ( ChannelInterface channel,
const RpcMethod method,
grpc::ClientContext context,
const InputMessage &  request,
OutputMessage *  result 
)

Wrapper that performs a blocking unary call.

May optionally specify the base class of the Request and Response so that the internal calls and structures below this may be based on those base classes and thus achieve code reuse across different RPCs (e.g., for protobuf, MessageLite would be a base class).

◆ CallbackUnaryCall()

template<class InputMessage , class OutputMessage , class BaseInputMessage = InputMessage, class BaseOutputMessage = OutputMessage>
void grpc::internal::CallbackUnaryCall ( ::grpc::ChannelInterface channel,
const ::grpc::internal::RpcMethod method,
::grpc::ClientContext context,
const InputMessage *  request,
OutputMessage *  result,
std::function< void(::grpc::Status)>  on_completion 
)

Perform a callback-based unary call.

May optionally specify the base class of the Request and Response so that the internal calls and structures below this may be based on those base classes and thus achieve code reuse across different RPCs (e.g., for protobuf, MessageLite would be a base class). TODO(vjpai): Combine as much as possible with the blocking unary call code

◆ CatchingCallback()

template<class Func , class... Args>
void grpc::internal::CatchingCallback ( Func &&  func,
Args &&...  args 
)

An exception-safe way of invoking a user-specified callback function.

◆ CatchingFunctionHandler()

template<class Callable >
::grpc::Status grpc::internal::CatchingFunctionHandler ( Callable &&  handler)

◆ CatchingReactorGetter()

template<class Reactor , class Func , class... Args>
Reactor* grpc::internal::CatchingReactorGetter ( Func &&  func,
Args &&...  args 
)

◆ FillMetadataArray()

grpc_metadata* grpc::internal::FillMetadataArray ( const std::multimap< std::string, std::string > &  metadata,
size_t *  metadata_count,
const std::string &  optional_error_details 
)
inline

◆ UnaryDeserializeHelper()

template<class RequestType >
void * grpc::internal::UnaryDeserializeHelper ( grpc_call call,
grpc_byte_buffer req,
::grpc::Status status,
RequestType *  request 
)

A helper function with reduced templating to do deserializing.

◆ UnaryRunHandlerHelper() [1/3]

template<class ResponseType >
void grpc::internal::UnaryRunHandlerHelper ( const ::grpc::internal::MethodHandler::HandlerParameter ,
ResponseType *  ,
::grpc::Status  
)

◆ UnaryRunHandlerHelper() [2/3]

template<class ResponseType >
void grpc::internal::UnaryRunHandlerHelper ( const MethodHandler::HandlerParameter ,
ResponseType *  ,
Status  
)

◆ UnaryRunHandlerHelper() [3/3]

template<class ResponseType >
void grpc::internal::UnaryRunHandlerHelper ( const MethodHandler::HandlerParameter param,
ResponseType *  rsp,
::grpc::Status status 
)

A helper function with reduced templating to do the common work needed to actually send the server response.

Uses non-const parameter for Status since this should only ever be called from the end of the RunHandler method.

Variable Documentation

◆ g_global_client_interceptor_factory

experimental::ClientInterceptorFactoryInterface* grpc::internal::g_global_client_interceptor_factory

◆ kBinaryErrorDetailsKey

const char grpc::internal::kBinaryErrorDetailsKey[] = "grpc-status-details-bin"