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

A test-only class to access private members and methods of ServerContext. More...

#include <server_context_test_spouse.h>

Public Member Functions

void AddClientMetadata (const std::string &key, const std::string &value)
 
std::multimap< std::string, std::string > GetInitialMetadata () const
 
std::multimap< std::string, std::string > GetTrailingMetadata () const
 
 ServerContextTestSpouse (ServerContext *ctx)
 

Private Attributes

std::multimap< std::string, std::string > client_metadata_storage_
 
ServerContextctx_
 

Detailed Description

A test-only class to access private members and methods of ServerContext.

Definition at line 30 of file grpcpp/test/server_context_test_spouse.h.

Constructor & Destructor Documentation

◆ ServerContextTestSpouse()

grpc::testing::ServerContextTestSpouse::ServerContextTestSpouse ( ServerContext ctx)
inlineexplicit

Definition at line 32 of file grpcpp/test/server_context_test_spouse.h.

Member Function Documentation

◆ AddClientMetadata()

void grpc::testing::ServerContextTestSpouse::AddClientMetadata ( const std::string &  key,
const std::string &  value 
)
inline

Inject client metadata to the ServerContext for the test. The test spouse must be alive when ServerContext::client_metadata is called.

Definition at line 36 of file grpcpp/test/server_context_test_spouse.h.

◆ GetInitialMetadata()

std::multimap<std::string, std::string> grpc::testing::ServerContextTestSpouse::GetInitialMetadata ( ) const
inline

Definition at line 48 of file grpcpp/test/server_context_test_spouse.h.

◆ GetTrailingMetadata()

std::multimap<std::string, std::string> grpc::testing::ServerContextTestSpouse::GetTrailingMetadata ( ) const
inline

Definition at line 52 of file grpcpp/test/server_context_test_spouse.h.

Member Data Documentation

◆ client_metadata_storage_

std::multimap<std::string, std::string> grpc::testing::ServerContextTestSpouse::client_metadata_storage_
private

Definition at line 58 of file grpcpp/test/server_context_test_spouse.h.

◆ ctx_

ServerContext* grpc::testing::ServerContextTestSpouse::ctx_
private

Definition at line 57 of file grpcpp/test/server_context_test_spouse.h.


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


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