Public Member Functions | Private Attributes | List of all members
grpc::testing::DefaultReactorTestPeer Class Reference

#include <default_reactor_test_peer.h>

Public Member Functions

 DefaultReactorTestPeer (CallbackServerContext *ctx)
 
 DefaultReactorTestPeer (CallbackServerContext *ctx, std::function< void(Status)> finish_func)
 
ServerUnaryReactorreactor () const
 
Status test_status () const
 
bool test_status_set () const
 

Private Attributes

CallbackServerContext *const ctx_
 

Detailed Description

A test-only class to monitor the behavior of the ServerContext's DefaultReactor. It is intended for allow unit-testing of a callback API service via direct invocation of the service methods rather than through RPCs. It is only applicable for unary RPC methods that use the DefaultReactor rather than any user-defined reactor. If it is used, it must be created before the RPC is invoked so that it can bind the reactor into a test mode rather than letting it follow the normal paths.

Definition at line 35 of file default_reactor_test_peer.h.

Constructor & Destructor Documentation

◆ DefaultReactorTestPeer() [1/2]

grpc::testing::DefaultReactorTestPeer::DefaultReactorTestPeer ( CallbackServerContext ctx)
inlineexplicit

Definition at line 37 of file default_reactor_test_peer.h.

◆ DefaultReactorTestPeer() [2/2]

grpc::testing::DefaultReactorTestPeer::DefaultReactorTestPeer ( CallbackServerContext ctx,
std::function< void(Status)>  finish_func 
)
inline

Definition at line 39 of file default_reactor_test_peer.h.

Member Function Documentation

◆ reactor()

ServerUnaryReactor* grpc::testing::DefaultReactorTestPeer::reactor ( ) const
inline

Definition at line 44 of file default_reactor_test_peer.h.

◆ test_status()

Status grpc::testing::DefaultReactorTestPeer::test_status ( ) const
inline

Definition at line 48 of file default_reactor_test_peer.h.

◆ test_status_set()

bool grpc::testing::DefaultReactorTestPeer::test_status_set ( ) const
inline

Definition at line 47 of file default_reactor_test_peer.h.

Member Data Documentation

◆ ctx_

CallbackServerContext* const grpc::testing::DefaultReactorTestPeer::ctx_
private

Definition at line 51 of file default_reactor_test_peer.h.


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


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:34