userver: userver/ugrpc/client/client_factory_settings.hpp Source File
Loading...
Searching...
No Matches
client_factory_settings.hpp
Go to the documentation of this file.
1#pragma once
2
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
15#include <userver/ugrpc/client/proxy_settings.hpp>
18
19USERVER_NAMESPACE_BEGIN
20
21namespace ugrpc::client {
22
25 AuthType auth_type{AuthType::kInsecure};
26
28 std::shared_ptr<grpc::ChannelCredentials> credentials;
29
32 std::unordered_map<std::string, std::shared_ptr<grpc::ChannelCredentials>> client_credentials;
33
36
39
42 grpc::ChannelArguments channel_args{};
43
46 std::optional<std::string> default_service_config;
47
50 std::size_t channel_count{1};
51
54};
55
58std::shared_ptr<grpc::ChannelCredentials> GetClientCredentials(
59 const ClientFactorySettings& client_factory_settings,
60 const std::string& client_name
61);
62
63} // namespace ugrpc::client
64
65USERVER_NAMESPACE_END