Skip to content

Commit b49c2fc

Browse files
author
hiddenpath
committed
YT-23616: Support ProxyRole in TCreateClientOptions
commit_hash:9ae5443415404568faae52d025c9c0fcbd8b8db4
1 parent 629604d commit b49c2fc

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

yt/cpp/mapreduce/client/client.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,6 +1545,10 @@ TClientContext CreateClientContext(
15451545
context.ServerName = Format("tvm.%v", context.ServerName);
15461546
}
15471547

1548+
if (options.ProxyRole_) {
1549+
context.Config->Hosts = "hosts?role=" + *options.ProxyRole_;
1550+
}
1551+
15481552
if (context.UseTLS || options.UseCoreHttpClient_) {
15491553
context.HttpClient = NHttpClient::CreateCoreHttpClient(context.UseTLS, context.Config);
15501554
} else {

yt/cpp/mapreduce/interface/client_method_options.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,6 +1118,9 @@ struct TCreateClientOptions
11181118

11191119
/// @brief Proxy Address to be used for connection
11201120
FLUENT_FIELD_OPTION(TString, ProxyAddress);
1121+
1122+
/// @brief Desired proxy role to be used for connection.
1123+
FLUENT_FIELD_OPTION(TString, ProxyRole);
11211124
};
11221125

11231126
///

0 commit comments

Comments
 (0)