/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
cloud/filestore/apps/client/lib/kick_endpoint.cpp
53 строки
1 KB
Andrei Strelkovskii
fixing 'ythrow TServiceError' pattern which breaks exception messages - introduced STORAGE_THROW_SERVICE_ERROR macro which builds much better messages (#4888)
21 дек 2025, 16:41
Не верифицирован
21 дек 2025, 16:41
8caf308
Код
Авторство
О чём код?
#include "command.h" namespace NCloud::NFileStore::NClient { namespace { //////////////////////////////////////////////////////////////////////////////// class TKickEndpointCommand final : public TEndpointCommand { private: ui32 KeyringId; public: TKickEndpointCommand() { Opts.AddLongOption("keyring-id") .Required() .RequiredArgument("NUM") .StoreResult(&KeyringId); } bool Execute() override { auto callContext = PrepareCallContext(); auto request = std::make_shared<NProto::TKickEndpointRequest>(); request->SetKeyringId(KeyringId); auto response = WaitFor( Client->KickEndpoint( std::move(callContext), std::move(request))); if (HasError(response)) { STORAGE_THROW_SERVICE_ERROR(response.GetError()); } return true; } }; } // namespace //////////////////////////////////////////////////////////////////////////////// TCommandPtr NewKickEndpointCommand() { return std::make_shared<TKickEndpointCommand>(); } } // namespace NCloud::NFileStore::NClient