userver
C++ Async Framework
Documentation
API Groups
Namespaces
Reference
Class List
Class Index
File List
Macros
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
Toggle main menu visibility
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
All results
client_factory_settings.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/ugrpc/client/client_factory_settings.hpp
4
/// @brief @copybrief ugrpc::client::ClientFactorySettings
5
6
#
include
<
memory
>
7
#
include
<
optional
>
8
#
include
<
string
>
9
#
include
<
unordered_map
>
10
11
#
include
<
grpcpp
/
security
/
credentials
.
h
>
12
#
include
<
grpcpp
/
support
/
channel_arguments
.
h
>
13
14
USERVER_NAMESPACE_BEGIN
15
16
namespace
ugrpc::
client
{
17
18
/// Settings relating to the ClientFactory
19
struct
ClientFactorySettings
final
{
20
/// gRPC channel credentials, none by default
21
std::shared_ptr<grpc::ChannelCredentials>
credentials
{grpc::InsecureChannelCredentials()};
22
23
/// gRPC channel credentials by client_name. If not set, default `credentials`
24
/// is used instead.
25
std
::
unordered_map
<
std
::
string
,
std
::
shared_ptr
<
grpc
::
ChannelCredentials
>>
client_credentials
{};
26
27
/// Optional grpc-core channel args
28
/// @see https://grpc.github.io/grpc/core/group__grpc__arg__keys.html
29
grpc::ChannelArguments
channel_args
{};
30
31
/// service config
32
/// @see https://github.com/grpc/grpc/blob/master/doc/service_config.md
33
std::optional<std::string>
default_service_config
;
34
35
/// Number of underlying channels that will be created for every client
36
/// in this factory.
37
std::size_t
channel_count
{1};
38
};
39
40
std::shared_ptr<grpc::ChannelCredentials>
41
GetClientCredentials(
const
ClientFactorySettings& client_factory_settings,
const
std::string& client_name);
42
43
}
// namespace ugrpc::client
44
45
USERVER_NAMESPACE_END
Docs version:
v1.0
,
v2.0
,
trunk/develop
userver
ugrpc
client
client_factory_settings.hpp
Generated on Thu Mar 13 2025 18:39:25 for userver by
Doxygen
1.10.0