diff options
author | omakovski <omakovski@yandex-team.ru> | 2022-02-10 16:49:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:30 +0300 |
commit | 9d2a99f5085a7425ef22831762c8684b687e0500 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/tvmauth/client/misc | |
parent | 5feb3b4d96aaa42ce546426241c48d626e6d6685 (diff) | |
download | ydb-9d2a99f5085a7425ef22831762c8684b687e0500.tar.gz |
Restoring authorship annotation for <omakovski@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/tvmauth/client/misc')
6 files changed, 39 insertions, 39 deletions
diff --git a/library/cpp/tvmauth/client/misc/threaded_updater.cpp b/library/cpp/tvmauth/client/misc/threaded_updater.cpp index d3b2b0fdac..5d21ce67a7 100644 --- a/library/cpp/tvmauth/client/misc/threaded_updater.cpp +++ b/library/cpp/tvmauth/client/misc/threaded_updater.cpp @@ -10,15 +10,15 @@ namespace NTvmAuth { TThreadedUpdaterBase::TThreadedUpdaterBase(TDuration workerAwakingPeriod, TLoggerPtr logger, const TString& url, - ui16 port, - TDuration socketTimeout, - TDuration connectTimeout) + ui16 port, + TDuration socketTimeout, + TDuration connectTimeout) : WorkerAwakingPeriod_(workerAwakingPeriod) , Logger_(std::move(logger)) , TvmUrl_(url) , TvmPort_(port) - , TvmSocketTimeout_(socketTimeout) - , TvmConnectTimeout_(connectTimeout) + , TvmSocketTimeout_(socketTimeout) + , TvmConnectTimeout_(connectTimeout) , IsStopped_(true) { Y_ENSURE_EX(Logger_, TNonRetriableException() << "Logger is required"); @@ -55,7 +55,7 @@ namespace NTvmAuth { TKeepAliveHttpClient& TThreadedUpdaterBase::GetClient() const { if (!HttpClient_) { - HttpClient_ = MakeHolder<TKeepAliveHttpClient>(TvmUrl_, TvmPort_, TvmSocketTimeout_, TvmConnectTimeout_); + HttpClient_ = MakeHolder<TKeepAliveHttpClient>(TvmUrl_, TvmPort_, TvmSocketTimeout_, TvmConnectTimeout_); } return *HttpClient_; diff --git a/library/cpp/tvmauth/client/misc/threaded_updater.h b/library/cpp/tvmauth/client/misc/threaded_updater.h index 218d8c7a1e..783684ba3b 100644 --- a/library/cpp/tvmauth/client/misc/threaded_updater.h +++ b/library/cpp/tvmauth/client/misc/threaded_updater.h @@ -20,12 +20,12 @@ namespace NTvmAuth::NInternal { namespace NTvmAuth { class TThreadedUpdaterBase: public TAsyncUpdaterBase { public: - TThreadedUpdaterBase(TDuration workerAwakingPeriod, - TLoggerPtr logger, - const TString& url, - ui16 port, - TDuration socketTimeout, - TDuration connectTimeout); + TThreadedUpdaterBase(TDuration workerAwakingPeriod, + TLoggerPtr logger, + const TString& url, + ui16 port, + TDuration socketTimeout, + TDuration connectTimeout); virtual ~TThreadedUpdaterBase(); protected: @@ -65,8 +65,8 @@ namespace NTvmAuth { mutable THolder<TKeepAliveHttpClient> HttpClient_; const ui32 TvmPort_; - const TDuration TvmSocketTimeout_; - const TDuration TvmConnectTimeout_; + const TDuration TvmSocketTimeout_; + const TDuration TvmConnectTimeout_; mutable TAutoEvent Event_; mutable TAutoEvent Started_; diff --git a/library/cpp/tvmauth/client/misc/tool/settings.cpp b/library/cpp/tvmauth/client/misc/tool/settings.cpp index c69798152b..894501f19d 100644 --- a/library/cpp/tvmauth/client/misc/tool/settings.cpp +++ b/library/cpp/tvmauth/client/misc/tool/settings.cpp @@ -9,8 +9,8 @@ namespace NTvmAuth::NTvmTool { : SelfAias_(selfAias) , Hostname_("localhost") , Port_(1) - , SocketTimeout_(TDuration::Seconds(5)) - , ConnectTimeout_(TDuration::Seconds(30)) + , SocketTimeout_(TDuration::Seconds(5)) + , ConnectTimeout_(TDuration::Seconds(30)) { AuthToken_ = GetEnv("TVMTOOL_LOCAL_AUTHTOKEN"); if (!AuthToken_) { diff --git a/library/cpp/tvmauth/client/misc/tool/settings.h b/library/cpp/tvmauth/client/misc/tool/settings.h index d2c42d1c6b..63255ed090 100644 --- a/library/cpp/tvmauth/client/misc/tool/settings.h +++ b/library/cpp/tvmauth/client/misc/tool/settings.h @@ -6,7 +6,7 @@ #include <library/cpp/tvmauth/checked_user_ticket.h> -#include <util/datetime/base.h> +#include <util/datetime/base.h> #include <util/generic/maybe.h> namespace NTvmAuth::NTvmTool { @@ -53,16 +53,16 @@ namespace NTvmAuth::NTvmTool { return *this; } - TClientSettings& SetSocketTimeout(TDuration socketTimeout) { - SocketTimeout_ = socketTimeout; - return *this; - } - - TClientSettings& SetConnectTimeout(TDuration connectTimeout) { - ConnectTimeout_ = connectTimeout; - return *this; - } - + TClientSettings& SetSocketTimeout(TDuration socketTimeout) { + SocketTimeout_ = socketTimeout; + return *this; + } + + TClientSettings& SetConnectTimeout(TDuration connectTimeout) { + ConnectTimeout_ = connectTimeout; + return *this; + } + /*! * Look at comment for ctor * @param token @@ -103,14 +103,14 @@ namespace NTvmAuth::NTvmTool { return Port_; } - TDuration GetSocketTimeout() const { - return SocketTimeout_; - } - - TDuration GetConnectTimeout() const { - return ConnectTimeout_; - } - + TDuration GetSocketTimeout() const { + return SocketTimeout_; + } + + TDuration GetConnectTimeout() const { + return ConnectTimeout_; + } + const TString& GetAuthToken() const { Y_ENSURE_EX(AuthToken_, TBrokenTvmClientSettings() << "Auth token cannot be empty. " @@ -129,8 +129,8 @@ namespace NTvmAuth::NTvmTool { TAlias SelfAias_; TString Hostname_; ui16 Port_; - TDuration SocketTimeout_; - TDuration ConnectTimeout_; + TDuration SocketTimeout_; + TDuration ConnectTimeout_; TString AuthToken_; TMaybe<EBlackboxEnv> BbEnv_; }; diff --git a/library/cpp/tvmauth/client/misc/tool/threaded_updater.cpp b/library/cpp/tvmauth/client/misc/tool/threaded_updater.cpp index 66275df93c..8490f7ab54 100644 --- a/library/cpp/tvmauth/client/misc/tool/threaded_updater.cpp +++ b/library/cpp/tvmauth/client/misc/tool/threaded_updater.cpp @@ -61,7 +61,7 @@ namespace NTvmAuth::NTvmTool { return TClientStatus::Ok; } - TThreadedUpdater::TThreadedUpdater(const TString& host, ui16 port, TDuration socketTimeout, TDuration connectTimeout, TLoggerPtr logger) + TThreadedUpdater::TThreadedUpdater(const TString& host, ui16 port, TDuration socketTimeout, TDuration connectTimeout, TLoggerPtr logger) : TThreadedUpdaterBase(TDuration::Seconds(5), logger, host, port, socketTimeout, connectTimeout) , MetaInfo_(logger) , ConfigWarnDelay_(TDuration::Seconds(30)) diff --git a/library/cpp/tvmauth/client/misc/tool/threaded_updater.h b/library/cpp/tvmauth/client/misc/tool/threaded_updater.h index fe686756d4..7fe88adfae 100644 --- a/library/cpp/tvmauth/client/misc/tool/threaded_updater.h +++ b/library/cpp/tvmauth/client/misc/tool/threaded_updater.h @@ -18,7 +18,7 @@ namespace NTvmAuth::NTvmTool { protected: // for tests TClientStatus::ECode GetState() const; - TThreadedUpdater(const TString& host, ui16 port, TDuration socketTimeout, TDuration connectTimeout, TLoggerPtr logger); + TThreadedUpdater(const TString& host, ui16 port, TDuration socketTimeout, TDuration connectTimeout, TLoggerPtr logger); void Init(const TClientSettings& settings); void UpdateState(); |