diff options
author | hiddenpath <hiddenpath@yandex-team.com> | 2025-02-15 22:51:37 +0300 |
---|---|---|
committer | hiddenpath <hiddenpath@yandex-team.com> | 2025-02-15 23:09:20 +0300 |
commit | b49c2fc9d96aa43f8f993a9e2f037209f0ebdb68 (patch) | |
tree | 89c33c6680eda2dbd59b8603fd9177e90513348b /yt | |
parent | 629604d7b6b82e83c694f3c0373ce1a2ab8d20cb (diff) | |
download | ydb-b49c2fc9d96aa43f8f993a9e2f037209f0ebdb68.tar.gz |
YT-23616: Support ProxyRole in TCreateClientOptions
commit_hash:9ae5443415404568faae52d025c9c0fcbd8b8db4
Diffstat (limited to 'yt')
-rw-r--r-- | yt/cpp/mapreduce/client/client.cpp | 4 | ||||
-rw-r--r-- | yt/cpp/mapreduce/interface/client_method_options.h | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/yt/cpp/mapreduce/client/client.cpp b/yt/cpp/mapreduce/client/client.cpp index 11c1a6af38..48e66435ab 100644 --- a/yt/cpp/mapreduce/client/client.cpp +++ b/yt/cpp/mapreduce/client/client.cpp @@ -1545,6 +1545,10 @@ TClientContext CreateClientContext( context.ServerName = Format("tvm.%v", context.ServerName); } + if (options.ProxyRole_) { + context.Config->Hosts = "hosts?role=" + *options.ProxyRole_; + } + if (context.UseTLS || options.UseCoreHttpClient_) { context.HttpClient = NHttpClient::CreateCoreHttpClient(context.UseTLS, context.Config); } else { diff --git a/yt/cpp/mapreduce/interface/client_method_options.h b/yt/cpp/mapreduce/interface/client_method_options.h index 807009682e..12743e077f 100644 --- a/yt/cpp/mapreduce/interface/client_method_options.h +++ b/yt/cpp/mapreduce/interface/client_method_options.h @@ -1118,6 +1118,9 @@ struct TCreateClientOptions /// @brief Proxy Address to be used for connection FLUENT_FIELD_OPTION(TString, ProxyAddress); + + /// @brief Desired proxy role to be used for connection. + FLUENT_FIELD_OPTION(TString, ProxyRole); }; /// |