userver
C++ Async Framework
Loading...
Searching...
No Matches
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
<
string
>
8
#
include
<
unordered_map
>
9
10
#
include
<
grpcpp
/
security
/
credentials
.
h
>
11
#
include
<
grpcpp
/
support
/
channel_arguments
.
h
>
12
13
#
include
<
userver
/
logging
/
level
.
hpp
>
14
15
USERVER_NAMESPACE_BEGIN
16
17
namespace
ugrpc::
client
{
18
19
// full rpc name -> count of channels
20
using
DedicatedMethodsConfig
=
std
::
unordered_map
<
std
::
string
,
std
::
size_t
>;
21
22
/// Settings relating to the ClientFactory
23
struct
ClientFactorySettings
final
{
24
/// gRPC channel credentials, none by default
25
std::shared_ptr<grpc::ChannelCredentials>
credentials
{grpc::InsecureChannelCredentials()};
26
27
/// gRPC channel credentials by client_name. If not set, default `credentials`
28
/// is used instead.
29
std
::
unordered_map
<
std
::
string
,
std
::
shared_ptr
<
grpc
::
ChannelCredentials
>>
client_credentials
{};
30
31
/// Optional grpc-core channel args
32
/// @see https://grpc.github.io/grpc/core/group__grpc__arg__keys.html
33
grpc::ChannelArguments
channel_args
{};
34
35
/// The logging level override for the internal grpcpp library. Must be either
36
/// `kDebug`, `kInfo` or `kError`.
37
logging
::
Level
native_log_level
{
logging
::
Level
::kError};
38
39
/// Number of underlying channels that will be created for every client
40
/// in this factory.
41
std::size_t
channel_count
{1};
42
};
43
44
}
// namespace ugrpc::client
45
46
USERVER_NAMESPACE_END
userver
ugrpc
client
client_factory_settings.hpp
Generated on Tue Nov 19 2024 11:30:20 for userver by
Doxygen
1.10.0