diff options
author | dvshkurko <dvshkurko@yandex-team.ru> | 2022-02-10 16:45:51 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:51 +0300 |
commit | 321ee9bce31ec6e238be26dbcbe539cffa2c3309 (patch) | |
tree | 14407a2757cbf29eb97e266b7f07e851f971000c /contrib/libs/grpc/src/cpp/client/create_channel.cc | |
parent | 2f6ca198245aeffd5e2d82b65927c2465b68b4f5 (diff) | |
download | ydb-321ee9bce31ec6e238be26dbcbe539cffa2c3309.tar.gz |
Restoring authorship annotation for <dvshkurko@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/grpc/src/cpp/client/create_channel.cc')
-rw-r--r-- | contrib/libs/grpc/src/cpp/client/create_channel.cc | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/contrib/libs/grpc/src/cpp/client/create_channel.cc b/contrib/libs/grpc/src/cpp/client/create_channel.cc index 97327490ed..0a3863e83f 100644 --- a/contrib/libs/grpc/src/cpp/client/create_channel.cc +++ b/contrib/libs/grpc/src/cpp/client/create_channel.cc @@ -21,7 +21,7 @@ #include <grpcpp/channel.h> #include <grpcpp/create_channel.h> #include <grpcpp/impl/grpc_library.h> -#include <grpcpp/security/credentials.h> +#include <grpcpp/security/credentials.h> #include <grpcpp/support/channel_arguments.h> #include "src/cpp/client/create_channel_internal.h" @@ -29,25 +29,25 @@ namespace grpc { std::shared_ptr<grpc::Channel> CreateChannel( const grpc::string& target, - const std::shared_ptr<grpc::ChannelCredentials>& creds) { + const std::shared_ptr<grpc::ChannelCredentials>& creds) { return CreateCustomChannel(target, creds, grpc::ChannelArguments()); } std::shared_ptr<grpc::Channel> CreateCustomChannel( const grpc::string& target, - const std::shared_ptr<grpc::ChannelCredentials>& creds, - const grpc::ChannelArguments& args) { - grpc::GrpcLibraryCodegen - init_lib; // We need to call init in case of bad creds. - return creds ? creds->CreateChannelImpl(target, args) - : grpc::CreateChannelInternal( + const std::shared_ptr<grpc::ChannelCredentials>& creds, + const grpc::ChannelArguments& args) { + grpc::GrpcLibraryCodegen + init_lib; // We need to call init in case of bad creds. + return creds ? creds->CreateChannelImpl(target, args) + : grpc::CreateChannelInternal( "", grpc_lame_client_channel_create( nullptr, GRPC_STATUS_INVALID_ARGUMENT, "Invalid credentials."), std::vector<std::unique_ptr< - grpc::experimental:: - ClientInterceptorFactoryInterface>>()); + grpc::experimental:: + ClientInterceptorFactoryInterface>>()); } namespace experimental { @@ -62,23 +62,23 @@ namespace experimental { /// hold an object or is invalid, a lame channel (one on which all operations /// fail) is returned. /// \param args Options for channel creation. -std::shared_ptr<grpc::Channel> CreateCustomChannelWithInterceptors( +std::shared_ptr<grpc::Channel> CreateCustomChannelWithInterceptors( const TString& target, - const std::shared_ptr<grpc::ChannelCredentials>& creds, - const grpc::ChannelArguments& args, + const std::shared_ptr<grpc::ChannelCredentials>& creds, + const grpc::ChannelArguments& args, std::vector< - std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>> + std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>> interceptor_creators) { - grpc::GrpcLibraryCodegen - init_lib; // We need to call init in case of bad creds. + grpc::GrpcLibraryCodegen + init_lib; // We need to call init in case of bad creds. return creds ? creds->CreateChannelWithInterceptors( target, args, std::move(interceptor_creators)) - : grpc::CreateChannelInternal( + : grpc::CreateChannelInternal( "", grpc_lame_client_channel_create( nullptr, GRPC_STATUS_INVALID_ARGUMENT, "Invalid credentials."), - std::move(interceptor_creators)); + std::move(interceptor_creators)); } } // namespace experimental |