diff options
author | alexnick <alexnick@yandex-team.ru> | 2022-02-17 14:23:34 +0300 |
---|---|---|
committer | alexnick <alexnick@yandex-team.ru> | 2022-02-17 14:23:34 +0300 |
commit | fd03a905d0671edeffde43ade486dc608bf69d95 (patch) | |
tree | d01659ada27349df9be25f8a8d5dab4f9ec4cd12 /library/cpp/tvmauth/client/misc/tool/settings.cpp | |
parent | 3dba88133a0e2bf63394fdba2affc51a771eff03 (diff) | |
download | ydb-fd03a905d0671edeffde43ade486dc608bf69d95.tar.gz |
remove tvm dependecy KIKIMR-14386
ref:d40a6e54d3da55ed1f9c9a0763552940acb0988b
Diffstat (limited to 'library/cpp/tvmauth/client/misc/tool/settings.cpp')
-rw-r--r-- | library/cpp/tvmauth/client/misc/tool/settings.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/library/cpp/tvmauth/client/misc/tool/settings.cpp b/library/cpp/tvmauth/client/misc/tool/settings.cpp deleted file mode 100644 index 894501f19d..0000000000 --- a/library/cpp/tvmauth/client/misc/tool/settings.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "settings.h" - -#include <library/cpp/string_utils/url/url.h> - -#include <util/system/env.h> - -namespace NTvmAuth::NTvmTool { - TClientSettings::TClientSettings(const TAlias& selfAias) - : SelfAias_(selfAias) - , Hostname_("localhost") - , Port_(1) - , SocketTimeout_(TDuration::Seconds(5)) - , ConnectTimeout_(TDuration::Seconds(30)) - { - AuthToken_ = GetEnv("TVMTOOL_LOCAL_AUTHTOKEN"); - if (!AuthToken_) { - AuthToken_ = GetEnv("QLOUD_TVM_TOKEN"); - } - TStringBuf auth(AuthToken_); - FixSpaces(auth); - AuthToken_ = auth; - - const TString url = GetEnv("DEPLOY_TVM_TOOL_URL"); - if (url) { - TStringBuf scheme, host; - TryGetSchemeHostAndPort(url, scheme, host, Port_); - } - - Y_ENSURE_EX(SelfAias_, TBrokenTvmClientSettings() << "Alias for your TVM client cannot be empty"); - } - - void TClientSettings::FixSpaces(TStringBuf& str) { - while (str && isspace(str.back())) { - str.Chop(1); - } - } -} |