userver: ugrpc::client::MiddlewareBase Class Reference
Loading...
Searching...
No Matches
ugrpc::client::MiddlewareBase Class Reference

#include <userver/ugrpc/client/middlewares/base.hpp>

Detailed Description

Base class for client gRPC middleware.

Examples
samples/grpc_middleware_service/src/middlewares/client/middleware.hpp.

Definition at line 57 of file base.hpp.

Public Member Functions

 MiddlewareBase (const MiddlewareBase &)=delete
 
 MiddlewareBase (MiddlewareBase &&)=delete
 
MiddlewareBaseoperator= (const MiddlewareBase &)=delete
 
MiddlewareBaseoperator= (MiddlewareBase &&)=delete
 
virtual void PreStartCall (MiddlewareCallContext &) const
 This function is called before rpc, on each rpc. It does nothing by default.
 
virtual void PreSendMessage (MiddlewareCallContext &, const google::protobuf::Message &) const
 This function is called before sending message, on each request. It does nothing by default.
 
virtual void PostRecvMessage (MiddlewareCallContext &, const google::protobuf::Message &) const
 This function is called after receiving message, on each response. It does nothing by default.
 
virtual void PostFinish (MiddlewareCallContext &, const grpc::Status &) const
 This function is called after rpc, on each rpc. It does nothing by default.
 

Member Function Documentation

◆ PostFinish()

virtual void ugrpc::client::MiddlewareBase::PostFinish ( MiddlewareCallContext & ,
const grpc::Status &  ) const
virtual

This function is called after rpc, on each rpc. It does nothing by default.

Note
Could be not called in case of deadline or network problem
See also
RpcInterruptedError

◆ PostRecvMessage()

virtual void ugrpc::client::MiddlewareBase::PostRecvMessage ( MiddlewareCallContext & ,
const google::protobuf::Message &  ) const
virtual

This function is called after receiving message, on each response. It does nothing by default.

Note
Not called for GenericClient messages

◆ PreSendMessage()

virtual void ugrpc::client::MiddlewareBase::PreSendMessage ( MiddlewareCallContext & ,
const google::protobuf::Message &  ) const
virtual

This function is called before sending message, on each request. It does nothing by default.

Note
Not called for GenericClient messages

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