userver: ugrpc::server::CallAnyBase Class Reference
Loading...
Searching...
No Matches
ugrpc::server::CallAnyBase Class Referenceabstract

A non-typed base class for any gRPC call. More...

#include <userver/ugrpc/server/rpc.hpp>

+ Inheritance diagram for ugrpc::server::CallAnyBase:

Public Member Functions

 CallAnyBase (impl::CallParams &&params)
 
virtual void FinishWithError (const grpc::Status &status)=0
 Complete the RPC with an error.
 
grpc::ServerContext & GetContext ()
 
std::string_view GetCallName () const
 Name of the call. Consists of service and method names.
 
tracing::SpanGetSpan ()
 
virtual bool IsFinished () const =0
 

Protected Member Functions

ugrpc::impl::RpcStatisticsScope & Statistics ()
 
logging::LoggerRef AccessTskvLogger ()
 
void LogFinish (grpc::Status status) const
 

Detailed Description

A non-typed base class for any gRPC call.

Definition at line 33 of file rpc.hpp.

Constructor & Destructor Documentation

◆ CallAnyBase()

ugrpc::server::CallAnyBase::CallAnyBase ( impl::CallParams &&  params)
inline

Definition at line 35 of file rpc.hpp.

Member Function Documentation

◆ AccessTskvLogger()

logging::LoggerRef ugrpc::server::CallAnyBase::AccessTskvLogger ( )
inlineprotected

Definition at line 65 of file rpc.hpp.

◆ FinishWithError()

virtual void ugrpc::server::CallAnyBase::FinishWithError ( const grpc::Status &  status)
pure virtual

Complete the RPC with an error.

Finish must not be called multiple times for the same RPC.

Parameters
statuserror details
Exceptions
ugrpc::server::RpcErroron an RPC error

Implemented in ugrpc::server::UnaryCall< Response >, ugrpc::server::InputStream< Request, Response >, ugrpc::server::OutputStream< Response >, and ugrpc::server::BidirectionalStream< Request, Response >.

◆ GetCallName()

std::string_view ugrpc::server::CallAnyBase::GetCallName ( ) const
inline

Name of the call. Consists of service and method names.

Definition at line 51 of file rpc.hpp.

◆ GetContext()

grpc::ServerContext & ugrpc::server::CallAnyBase::GetContext ( )
inline
Returns
the ServerContext used for this RPC
Note
Initial server metadata is not currently supported
Trailing metadata, if any, must be set before the Finish call

Definition at line 48 of file rpc.hpp.

◆ GetSpan()

tracing::Span & ugrpc::server::CallAnyBase::GetSpan ( )
inline

Definition at line 53 of file rpc.hpp.

◆ Statistics()

ugrpc::impl::RpcStatisticsScope & ugrpc::server::CallAnyBase::Statistics ( )
inlineprotected

Definition at line 63 of file rpc.hpp.


The documentation for this class was generated from the following file: