/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
cloud/vm/blockstore/lib/helper.cpp
34 строки
1008 B
Nikita Menkovich
chore: remove yateam mentions and fix links where possible (#801)
22 мар 2024, 19:32
Не верифицирован
22 мар 2024, 19:32
5f168fc
Код
Авторство
О чём код?
#include "helper.h" #include <library/cpp/protobuf/util/pb_io.h> #include <util/generic/string.h> #include <util/generic/yexception.h> namespace NCloud::NBlockStore::NPlugin { //////////////////////////////////////////////////////////////////////////////// NProto::TClientAppConfig ParseClientAppConfig( const NProto::TPluginConfig& pluginConfig, const TString& defaultClientConfigPath, const TString& fallbackClientConfigPath) { NProto::TClientAppConfig appConfig; auto configPath = pluginConfig.GetClientConfig(); if (!configPath) { configPath = defaultClientConfigPath; } if (!TryParseFromTextFormat(configPath, appConfig)) { // Use default config for all clusters when deploying with k8s // see NBS-3250 if (!TryParseFromTextFormat(fallbackClientConfigPath, appConfig)) { ythrow yexception() << "can't parse client config from file"; } } return appConfig; } } // namespace NCloud::NBlockStore::NPlugin