Definition at line 9 of file middleware.hpp.
Public Member Functions | |
void | OnCallStart (MiddlewareCallContext &context) const override |
This hook is invoked once per Call (RPC), after the message metadata is received, but before the handler function is called. | |
virtual void | PostRecvMessage (MiddlewareCallContext &context, google::protobuf::Message &request) const |
The function is invoked after each received message. | |
virtual void | PreSendMessage (MiddlewareCallContext &context, google::protobuf::Message &response) const |
The function is invoked before each sended message. | |
virtual void | OnCallFinish (MiddlewareCallContext &context, const grpc::Status &status) const |
This hook is invoked once per Call (RPC), after the handler function returns, but before the message is sent to the upstream client. | |
Static Public Attributes | |
static constexpr std::string_view | kName = "grpc-server-baggage" |
The default name of ugrpc::server::middlewares::baggage::Component. | |
static const auto | kDependency = ::middlewares::MiddlewareDependencyBuilder() |
dependency of this middleware | |
|
virtualinherited |
This hook is invoked once per Call (RPC), after the handler function returns, but before the message is sent to the upstream client.
All OnCallStart invoked in the reverse order relatively OnCallFinish. You can change grpc status and it will apply for a rpc call.
Reimplemented in ugrpc::server::middlewares::deadline_propagation::Middleware.
|
overridevirtual |
This hook is invoked once per Call (RPC), after the message metadata is received, but before the handler function is called.
If all OnCallStart succeeded => OnCallFinish will invoked after a success method call.
Reimplemented from ugrpc::server::MiddlewareBase.
|
virtualinherited |
The function is invoked after each received message.
PostRecvMessage is called:
Reimplemented in grpc_protovalidate::server::Middleware.
|
virtualinherited |
The function is invoked before each sended message.
PreSendMessage is called:
|
inlinestatic |
dependency of this middleware
Definition at line 16 of file middleware.hpp.