-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathconfig_initializer.h
87 lines (69 loc) · 3.07 KB
/
config_initializer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#pragma once
#include "private.h"
#include <cloud/blockstore/libs/common/public.h>
#include <cloud/blockstore/libs/diagnostics/public.h>
#include <cloud/blockstore/libs/kikimr/public.h>
#include <cloud/blockstore/libs/rdma/iface/public.h>
#include <cloud/blockstore/libs/server/public.h>
#include <cloud/blockstore/libs/service/public.h>
#include <cloud/blockstore/libs/spdk/iface/config.h>
#include <cloud/blockstore/libs/storage/core/config.h>
#include <cloud/blockstore/libs/storage/disk_agent/model/config.h>
#include <cloud/blockstore/libs/storage/disk_registry_proxy/model/public.h>
#include <cloud/storage/core/libs/coroutine/public.h>
#include <cloud/storage/core/libs/features/features_config.h>
#include <contrib/ydb/core/protos/auth.pb.h>
#include <contrib/ydb/core/protos/blobstorage.pb.h>
#include <contrib/ydb/core/protos/config.pb.h>
#include <library/cpp/logger/log.h>
namespace NCloud::NBlockStore::NServer {
////////////////////////////////////////////////////////////////////////////////
struct TConfigInitializer
{
const TOptionsPtr Options;
NKikimrConfig::TAppConfigPtr KikimrConfig;
TServerAppConfigPtr ServerConfig;
NStorage::TStorageConfigPtr StorageConfig;
NStorage::TDiskAgentConfigPtr DiskAgentConfig;
NStorage::TDiskRegistryProxyConfigPtr DiskRegistryProxyConfig;
TDiagnosticsConfigPtr DiagnosticsConfig;
NSpdk::TSpdkEnvConfigPtr SpdkEnvConfig;
NFeatures::TFeaturesConfigPtr FeaturesConfig;
NRdma::TRdmaConfigPtr RdmaConfig;
TString Rack;
TLog Log;
TConfigInitializer(TOptionsPtr options)
: Options(std::move(options))
{}
void ApplyCMSConfigs(NKikimrConfig::TAppConfig cmsConfig);
void ApplyCustomCMSConfigs(const NKikimrConfig::TAppConfig& config);
void InitKikimrConfig();
void InitDiagnosticsConfig();
void InitStorageConfig();
void InitDiskAgentConfig();
void InitDiskRegistryProxyConfig();
void InitServerConfig();
void InitSpdkEnvConfig();
void InitFeaturesConfig();
void InitRdmaConfig();
NKikimrConfig::TLogConfig GetLogConfig() const;
NKikimrConfig::TMonitoringConfig GetMonitoringConfig() const;
private:
TString GetFullSchemeShardDir() const;
void SetupMonitoringConfig(NKikimrConfig::TMonitoringConfig& monConfig) const;
void SetupLogConfig(NKikimrConfig::TLogConfig& logConfig) const;
void SetupDiskAgentConfig(NProto::TDiskAgentConfig& config) const;
void ApplyLogConfig(const TString& text);
void ApplyAuthConfig(const TString& text);
void ApplyFeaturesConfig(const TString& text);
void ApplyServerAppConfig(const TString& text);
void ApplyMonitoringConfig(const TString& text);
void ApplyActorSystemConfig(const TString& text);
void ApplyDiagnosticsConfig(const TString& text);
void ApplyInterconnectConfig(const TString& text);
void ApplyStorageServiceConfig(const TString& text);
void ApplyDiskAgentConfig(const TString& text);
void ApplyDiskRegistryProxyConfig(const TString& text);
void ApplySpdkEnvConfig(const NProto::TSpdkEnvConfig& config);
};
} // namespace NCloud::NBlockStore::NServer