/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
cloud/filestore/apps/client/lib/describe.cpp
52 строки
1 KB
Mikhail Montsev
[Filestore] remove the TTextPrinter singleton to fix a crash caused by accessing a destroyed singleton during filestore-client shutdown (#5746)
18 апр 2026, 02:39
Не верифицирован
18 апр 2026, 02:39
8e859e4
Код
Авторство
О чём код?
#include "command.h" namespace NCloud::NFileStore::NClient { namespace { //////////////////////////////////////////////////////////////////////////////// class TDescribeCommand final : public TFileStoreCommand { public: TDescribeCommand() = default; bool Execute() override { auto callContext = PrepareCallContext(); auto request = std::make_shared<NProto::TGetFileStoreInfoRequest>(); request->SetFileSystemId(FileSystemId); auto response = WaitFor( Client->GetFileStoreInfo( std::move(callContext), std::move(request))); if (HasError(response)) { STORAGE_THROW_SERVICE_ERROR(response.GetError()); } if (JsonOutput) { response.PrintJSON(Cout); } else { Cout << "Filestore: " << ProtoMessagePrinter.ToString(response.GetFileStore()) << Endl; } return true; } }; } // namespace //////////////////////////////////////////////////////////////////////////////// TCommandPtr NewDescribeCommand() { return std::make_shared<TDescribeCommand>(); } } // namespace NCloud::NFileStore::NClient