userver: ugrpc::client::ClientFactory Class Reference
Loading...
Searching...
No Matches
ugrpc::client::ClientFactory Class Referencefinal

#include <userver/ugrpc/client/client_factory.hpp>

Detailed Description

Creates gRPC clients.

Typically obtained from ugrpc::client::ClientFactoryComponent. In tests and benchmarks, obtained from ugrpc::tests::ServiceBase and friends.

Has a minimal built-in channel cache: as long as a channel to the same endpoint is used somewhere, the same channel is given out.

Definition at line 80 of file client_factory.hpp.

Public Member Functions

template<typename Client >
Client MakeClient (ClientSettings &&settings)
 Make a client of the specified code-generated type.
 
template<typename Client >
Client MakeClient (const std::string &client_name, const std::string &endpoint)
 Make a client of the specified code-generated type.
 

Member Function Documentation

◆ MakeClient() [1/2]

template<typename Client >
Client ugrpc::client::ClientFactory::MakeClient ( ClientSettings && settings)

Make a client of the specified code-generated type.

Definition at line 123 of file client_factory.hpp.

◆ MakeClient() [2/2]

template<typename Client >
Client ugrpc::client::ClientFactory::MakeClient ( const std::string & client_name,
const std::string & endpoint )

Make a client of the specified code-generated type.

Deprecated
Use the overload taking ClientSettings instead.
Parameters
client_namesee ClientSettings
endpointsee ClientSettings

Definition at line 128 of file client_factory.hpp.


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