ydb-embedded-ui 4.9.0 → 4.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/components/BasicNodeViewer/BasicNodeViewer.tsx +7 -4
  3. package/dist/components/EntityStatus/EntityStatus.js +3 -1
  4. package/dist/components/FormattedBytes/FormattedBytes.tsx +10 -0
  5. package/dist/components/FormattedBytes/utils.tsx +13 -0
  6. package/dist/components/FullNodeViewer/FullNodeViewer.tsx +73 -0
  7. package/dist/components/InfoViewer/formatters/schema.ts +3 -1
  8. package/dist/components/InfoViewer/formatters/table.ts +6 -5
  9. package/dist/components/ProblemFilter/ProblemFilter.tsx +2 -2
  10. package/dist/components/SpeedMultiMeter/SpeedMultiMeter.tsx +4 -4
  11. package/dist/components/TableWithControlsLayout/TableWithControlsLayout.scss +32 -0
  12. package/dist/components/TableWithControlsLayout/TableWithControlsLayout.tsx +43 -0
  13. package/dist/components/TruncatedQuery/{TruncatedQuery.js → TruncatedQuery.tsx} +10 -8
  14. package/dist/containers/AsideNavigation/AsideNavigation.tsx +8 -8
  15. package/dist/containers/Cluster/Cluster.scss +4 -5
  16. package/dist/containers/Cluster/Cluster.tsx +13 -28
  17. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +4 -0
  18. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.tsx +7 -0
  19. package/dist/containers/Cluster/ClusterInfoSkeleton/ClusterInfoSkeleton.tsx +1 -1
  20. package/dist/containers/Cluster/utils.tsx +0 -11
  21. package/dist/containers/Header/Header.scss +1 -5
  22. package/dist/containers/Node/Node.tsx +3 -3
  23. package/dist/containers/Nodes/Nodes.scss +1 -24
  24. package/dist/containers/Nodes/Nodes.tsx +30 -40
  25. package/dist/containers/Storage/PDisk/PDisk.tsx +2 -7
  26. package/dist/containers/Storage/Storage.scss +1 -14
  27. package/dist/containers/Storage/Storage.tsx +237 -0
  28. package/dist/containers/Storage/StorageGroups/StorageGroups.tsx +45 -40
  29. package/dist/containers/Storage/StorageNodes/StorageNodes.tsx +12 -16
  30. package/dist/containers/Storage/StorageTypeFilter/StorageTypeFilter.tsx +3 -1
  31. package/dist/containers/Storage/{StorageVisibleEntityFilter/StorageVisibleEntityFilter.tsx → StorageVisibleEntitiesFilter/StorageVisibleEntitiesFilter.tsx} +4 -2
  32. package/dist/containers/Storage/UsageFilter/UsageFilter.scss +1 -0
  33. package/dist/containers/Storage/UsageFilter/UsageFilter.tsx +17 -17
  34. package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +6 -2
  35. package/dist/containers/Tenant/Diagnostics/Diagnostics.tsx +3 -3
  36. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +7 -4
  37. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +0 -15
  38. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.tsx +10 -3
  39. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +3 -12
  40. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +2 -7
  41. package/dist/containers/Tenant/{Preview → Query/Preview}/Preview.scss +1 -1
  42. package/dist/containers/Tenant/Query/Preview/Preview.tsx +121 -0
  43. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.tsx +1 -1
  44. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +6 -8
  45. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.tsx +1 -1
  46. package/dist/containers/Tenant/Query/i18n/en.json +9 -2
  47. package/dist/containers/Tenant/Query/i18n/ru.json +9 -2
  48. package/dist/containers/Tenants/Tenants.scss +1 -13
  49. package/dist/containers/Tenants/Tenants.tsx +262 -0
  50. package/dist/services/api.ts +8 -3
  51. package/dist/store/reducers/nodes/nodes.ts +4 -112
  52. package/dist/store/reducers/nodes/selectors.ts +74 -0
  53. package/dist/store/reducers/nodes/utils.ts +46 -0
  54. package/dist/store/reducers/partitions/types.ts +3 -3
  55. package/dist/store/reducers/settings/settings.ts +4 -2
  56. package/dist/store/reducers/settings/types.ts +3 -1
  57. package/dist/store/reducers/storage/selectors.ts +279 -0
  58. package/dist/store/reducers/storage/storage.ts +191 -0
  59. package/dist/store/reducers/storage/types.ts +80 -0
  60. package/dist/store/reducers/tenants/selectors.ts +46 -0
  61. package/dist/store/reducers/tenants/tenants.ts +21 -14
  62. package/dist/store/reducers/tenants/types.ts +20 -5
  63. package/dist/store/reducers/tenants/utils.ts +68 -0
  64. package/dist/types/additionalProps.ts +8 -0
  65. package/dist/types/api/compute.ts +27 -2
  66. package/dist/types/api/nodes.ts +12 -1
  67. package/dist/types/api/schema/cdcStream.ts +32 -0
  68. package/dist/types/api/schema/columnEntity.ts +138 -0
  69. package/dist/types/api/schema/externalDataSource.ts +24 -0
  70. package/dist/types/api/schema/externalTable.ts +14 -0
  71. package/dist/types/api/schema/index.ts +10 -0
  72. package/dist/types/api/schema/persQueueGroup.ts +191 -0
  73. package/dist/types/api/schema/schema.ts +299 -0
  74. package/dist/types/api/schema/shared.ts +42 -0
  75. package/dist/types/api/schema/table.ts +616 -0
  76. package/dist/types/api/schema/tableIndex.ts +33 -0
  77. package/dist/types/api/storage.ts +1 -1
  78. package/dist/types/store/topic.ts +3 -3
  79. package/dist/utils/bytesParsers/__test__/formatBytes.test.ts +38 -0
  80. package/dist/utils/bytesParsers/convertBytesObjectToSpeed.ts +2 -2
  81. package/dist/utils/bytesParsers/formatBytes.ts +132 -0
  82. package/dist/utils/bytesParsers/i18n/en.json +1 -0
  83. package/dist/utils/bytesParsers/i18n/ru.json +1 -0
  84. package/dist/utils/bytesParsers/index.ts +1 -1
  85. package/dist/utils/index.js +5 -10
  86. package/dist/utils/numeral.ts +8 -0
  87. package/package.json +1 -1
  88. package/dist/assets/icons/versions.svg +0 -3
  89. package/dist/components/FullNodeViewer/FullNodeViewer.js +0 -89
  90. package/dist/containers/Node/NodeOverview/NodeOverview.scss +0 -0
  91. package/dist/containers/Node/NodeOverview/NodeOverview.tsx +0 -21
  92. package/dist/containers/Storage/Storage.js +0 -350
  93. package/dist/containers/Tenant/Preview/Preview.js +0 -168
  94. package/dist/containers/Tenants/Tenants.js +0 -363
  95. package/dist/store/reducers/storage/storage.js +0 -404
  96. package/dist/types/api/schema.ts +0 -1326
  97. package/dist/utils/bytesParsers/formatBytesCustom.ts +0 -57
@@ -0,0 +1,68 @@
1
+ import type {TTenant} from '../../../types/api/tenant';
2
+ import {isNumeric} from '../../../utils/utils';
3
+
4
+ const getControlPlaneValue = (tenant: TTenant) => {
5
+ const parts = tenant.Name.split('/');
6
+ const defaultValue = parts.length ? parts[parts.length - 1] : '—';
7
+ const controlPlaneName = tenant.ControlPlane?.name;
8
+
9
+ return controlPlaneName ?? defaultValue;
10
+ };
11
+
12
+ const getTenantBackend = (tenant: TTenant) => {
13
+ const node = tenant.Nodes ? tenant.Nodes[0] : {};
14
+ const address =
15
+ node.Host && node.Endpoints
16
+ ? node.Endpoints.find((endpoint) => endpoint.Name === 'http-mon')?.Address
17
+ : undefined;
18
+ return node.Host ? `${node.Host}${address ? address : ''}` : undefined;
19
+ };
20
+
21
+ const calculateTenantMetrics = (tenant: TTenant) => {
22
+ const {CoresUsed, MemoryUsed, StorageAllocatedSize, Metrics = {}} = tenant;
23
+
24
+ const cpuFromCores = isNumeric(CoresUsed) ? Number(CoresUsed) * 1_000_000 : undefined;
25
+ const cpuFromMetrics = isNumeric(Metrics.CPU) ? Number(Metrics.CPU) : undefined;
26
+
27
+ const cpu = cpuFromCores ?? cpuFromMetrics ?? 0;
28
+
29
+ const rawMemory = MemoryUsed ?? Metrics.Memory;
30
+ const rawStorage = StorageAllocatedSize ?? Metrics.Storage;
31
+
32
+ const memory = isNumeric(rawMemory) ? Number(rawMemory) : 0;
33
+ const storage = isNumeric(rawStorage) ? Number(rawStorage) : 0;
34
+
35
+ return {cpu, memory, storage};
36
+ };
37
+
38
+ const calculateTenantEntities = (tenant: TTenant) => {
39
+ const {StorageGroups, NodeIds} = tenant;
40
+
41
+ const nodesCount = NodeIds?.length ?? 0;
42
+ const groupsCount = isNumeric(StorageGroups) ? Number(StorageGroups) : 0;
43
+
44
+ return {nodesCount, groupsCount};
45
+ };
46
+
47
+ export const prepareTenants = (tenants: TTenant[], useNodeAsBackend: boolean) => {
48
+ return tenants.map((tenant) => {
49
+ const backend = useNodeAsBackend ? getTenantBackend(tenant) : undefined;
50
+ const sharedTenantName = tenants.find((item) => item.Id === tenant.ResourceId)?.Name;
51
+ const controlPlaneName = getControlPlaneValue(tenant);
52
+ const {cpu, memory, storage} = calculateTenantMetrics(tenant);
53
+ const {nodesCount, groupsCount} = calculateTenantEntities(tenant);
54
+
55
+ return {
56
+ ...tenant,
57
+
58
+ backend,
59
+ sharedTenantName,
60
+ controlPlaneName,
61
+ cpu,
62
+ memory,
63
+ storage,
64
+ nodesCount,
65
+ groupsCount,
66
+ };
67
+ });
68
+ };
@@ -1,4 +1,7 @@
1
+ import type {ReactNode} from 'react';
2
+
1
3
  import type {InfoViewerItem} from '../components/InfoViewer';
4
+ import type {ETenantType} from './api/tenant';
2
5
  import type {VersionToColorMap} from './versions';
3
6
 
4
7
  export interface AdditionalVersionsProps {
@@ -14,3 +17,8 @@ export interface AdditionalClusterProps {
14
17
  info?: InfoViewerItem[];
15
18
  links?: ClusterLink[];
16
19
  }
20
+
21
+ export interface AdditionalTenantsProps {
22
+ prepareTenantBackend?: (backend: string | undefined) => string | undefined;
23
+ getMonitoringLink?: (name: string, type: ETenantType) => ReactNode;
24
+ }
@@ -4,13 +4,20 @@ import {TMetrics} from './tenant';
4
4
 
5
5
  /**
6
6
  * endpoint: viewer/json/compute
7
- *
7
+ *
8
8
  * source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/viewer/protos/viewer.proto
9
+ *
10
+ * response has 2 versions, depending on version param in request
9
11
  */
10
12
  export interface TComputeInfo {
11
13
  Overall: EFlag;
12
- Tenants?: TComputeTenantInfo[];
14
+ Tenants?: TComputeTenantInfo[]; // v1
13
15
  Errors?: string[];
16
+ /** uint64 */
17
+ TotalNodes: string;
18
+ /** uint64 */
19
+ FoundNodes: string;
20
+ Nodes?: TComputeNodeInfo[]; // v2
14
21
  }
15
22
 
16
23
  interface TComputeTenantInfo {
@@ -43,6 +50,7 @@ export interface TComputeNodeInfo {
43
50
  MemoryLimit?: string;
44
51
  Metrics: TMetrics;
45
52
  Tablets?: TTabletStateInfo[];
53
+ Tenant?: string; // For v2 response without grouping by tenants
46
54
  }
47
55
 
48
56
  // Tablets in compute nodes
@@ -52,3 +60,20 @@ export interface TTabletStateInfo {
52
60
  State: EFlag;
53
61
  Count: number;
54
62
  }
63
+
64
+ export enum EVersion {
65
+ v1,
66
+ v2, // only this versions works with sorting
67
+ }
68
+
69
+ export enum ESort {
70
+ NodeId,
71
+ Host,
72
+ DC,
73
+ Rack,
74
+ Version,
75
+ Uptime,
76
+ Memory,
77
+ CPU,
78
+ LoadAverage,
79
+ }
@@ -5,7 +5,7 @@ import {TVDiskStateInfo} from './vdisk';
5
5
 
6
6
  /**
7
7
  * endpoint: /viewer/json/nodes
8
- *
8
+ *
9
9
  * source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/viewer/protos/viewer.proto
10
10
  */
11
11
  export interface TNodesInfo {
@@ -101,3 +101,14 @@ enum EConfigState {
101
101
  'Consistent' = 'Consistent',
102
102
  'Outdated' = 'Outdated',
103
103
  }
104
+
105
+ export enum ESort {
106
+ NodeId,
107
+ Host,
108
+ DC,
109
+ Version,
110
+ Uptime,
111
+ Memory,
112
+ CPU,
113
+ LoadAverage,
114
+ }
@@ -0,0 +1,32 @@
1
+ import type {TPathID} from './shared';
2
+
3
+ export interface TCdcStreamDescription {
4
+ Name?: string;
5
+ Mode?: ECdcStreamMode;
6
+ Format?: ECdcStreamFormat;
7
+ PathId?: TPathID;
8
+ State?: ECdcStreamState;
9
+ /** uint64 */
10
+ SchemaVersion?: string;
11
+ }
12
+
13
+ enum ECdcStreamMode {
14
+ ECdcStreamModeInvalid = 'ECdcStreamModeInvalid',
15
+ ECdcStreamModeKeysOnly = 'ECdcStreamModeKeysOnly',
16
+ ECdcStreamModeUpdate = 'ECdcStreamModeUpdate',
17
+ ECdcStreamModeNewImage = 'ECdcStreamModeNewImage',
18
+ ECdcStreamModeOldImage = 'ECdcStreamModeOldImage',
19
+ ECdcStreamModeNewAndOldImages = 'ECdcStreamModeNewAndOldImages',
20
+ }
21
+
22
+ enum ECdcStreamFormat {
23
+ ECdcStreamFormatInvalid = 'ECdcStreamFormatInvalid',
24
+ ECdcStreamFormatProto = 'ECdcStreamFormatProto',
25
+ ECdcStreamFormatJson = 'ECdcStreamFormatJson',
26
+ }
27
+
28
+ enum ECdcStreamState {
29
+ ECdcStreamStateInvalid = 'ECdcStreamStateInvalid',
30
+ ECdcStreamStateReady = 'ECdcStreamStateReady',
31
+ ECdcStreamStateDisabled = 'ECdcStreamStateDisabled',
32
+ }
@@ -0,0 +1,138 @@
1
+ import type {EColumnCodec, EUnit, TPathID, TStorageSettings, TTypeInfo} from './shared';
2
+
3
+ export interface TColumnTableDescription {
4
+ Name?: string;
5
+
6
+ Schema?: TColumnTableSchema;
7
+ TtlSettings?: TColumnDataLifeCycle;
8
+
9
+ SchemaPresetId?: number;
10
+ SchemaPresetName?: string;
11
+
12
+ ColumnStorePathId?: TPathID;
13
+
14
+ ColumnShardCount?: number;
15
+ Sharding?: TColumnTableSharding;
16
+
17
+ /** uint64 */
18
+ SchemaPresetVersionAdj?: string;
19
+ /** uint64 */
20
+ TtlSettingsPresetVersionAdj?: string;
21
+
22
+ StorageConfig?: TColumnStorageConfig;
23
+ }
24
+
25
+ export interface TColumnStoreDescription {
26
+ Name?: string;
27
+ ColumnShardCount?: number;
28
+
29
+ /** uint64 */
30
+ ColumnShards?: string[];
31
+
32
+ SchemaPresets?: TColumnTableSchemaPreset[];
33
+ StorageConfig?: TColumnStorageConfig;
34
+
35
+ NextSchemaPresetId?: number;
36
+ NextTtlSettingsPresetId?: number;
37
+ }
38
+
39
+ export interface TColumnDataLifeCycle {
40
+ Enabled?: TTtl;
41
+ Disabled?: {};
42
+ Tiering?: TStorageTiering;
43
+
44
+ /** uint64 */
45
+ Version?: string;
46
+ }
47
+
48
+ interface TColumnStorageConfig {
49
+ SysLog?: TStorageSettings;
50
+ Log?: TStorageSettings;
51
+ Data?: TStorageSettings;
52
+ DataChannelCount?: number;
53
+ }
54
+
55
+ interface TStorageTiering {
56
+ Tiers?: TStorageTier[];
57
+ }
58
+
59
+ interface TStorageTier {
60
+ Name?: string;
61
+ Eviction?: TTtl;
62
+ }
63
+
64
+ interface TTtl {
65
+ ColumnName?: string;
66
+
67
+ ExpireAfterSeconds?: number;
68
+
69
+ /** uint64 */
70
+ ExpireAfterBytes?: string;
71
+
72
+ ColumnUnit?: EUnit;
73
+ }
74
+
75
+ interface TColumnTableSchema {
76
+ Columns?: TOlapColumnDescription[];
77
+ KeyColumnNames?: string[];
78
+ Engine?: EColumnTableEngine;
79
+ NextColumnId?: number;
80
+
81
+ /** uint64 */
82
+ Version?: string;
83
+
84
+ DefaultCompression?: TCompressionOptions;
85
+ EnableTiering?: boolean;
86
+ }
87
+
88
+ interface TColumnTableSchemaPreset {
89
+ Id?: number;
90
+ Name?: string;
91
+ Schema?: TColumnTableSchema;
92
+ }
93
+
94
+ interface TOlapColumnDescription {
95
+ Id?: number;
96
+ Name?: string;
97
+ Type?: string;
98
+ TypeId?: number;
99
+ TypeInfo?: TTypeInfo;
100
+ }
101
+
102
+ interface TColumnTableSharding {
103
+ /** uint64 */
104
+ Version?: string;
105
+
106
+ /** uint64 */
107
+ ColumnShards?: string[];
108
+
109
+ /** uint64 */
110
+ AdditionalColumnShards?: string[];
111
+
112
+ UniquePrimaryKey?: boolean;
113
+
114
+ RandomSharding?: {};
115
+ HashSharding?: THashSharding;
116
+ }
117
+
118
+ interface THashSharding {
119
+ Function?: EHashFunction;
120
+ Columns?: string[];
121
+ UniqueShardKey?: boolean;
122
+ ActiveShardsCount?: number;
123
+ }
124
+
125
+ interface TCompressionOptions {
126
+ CompressionCodec?: EColumnCodec;
127
+ CompressionLevel?: number;
128
+ }
129
+
130
+ enum EHashFunction {
131
+ HASH_FUNCTION_MODULO_N = 'HASH_FUNCTION_MODULO_N',
132
+ HASH_FUNCTION_CLOUD_LOGS = 'HASH_FUNCTION_CLOUD_LOGS',
133
+ }
134
+
135
+ enum EColumnTableEngine {
136
+ COLUMN_ENGINE_NONE = 'COLUMN_ENGINE_NONE',
137
+ COLUMN_ENGINE_REPLACING_TIMESERIES = 'COLUMN_ENGINE_REPLACING_TIMESERIES',
138
+ }
@@ -0,0 +1,24 @@
1
+ import type {TPathID} from './shared';
2
+
3
+ export interface TExternalDataSourceDescription {
4
+ Name?: string;
5
+ PathId?: TPathID;
6
+ /** uint64 */
7
+ Version?: string;
8
+ SourceType?: string;
9
+ Location?: string;
10
+ Installation?: string;
11
+ Auth?: TAuth;
12
+ }
13
+
14
+ interface TAuth {
15
+ None?: NoneAuth;
16
+ ServiceAccount?: ServiceAccountAuth;
17
+ }
18
+
19
+ interface NoneAuth {}
20
+
21
+ interface ServiceAccountAuth {
22
+ Id?: string;
23
+ SecretName?: string;
24
+ }
@@ -0,0 +1,14 @@
1
+ import type {TColumnDescription, TPathID} from './shared';
2
+
3
+ export interface TExternalTableDescription {
4
+ Name?: string;
5
+ PathId?: TPathID;
6
+ /** uint64 */
7
+ Version?: string;
8
+ SourceType?: string;
9
+ DataSourcePath?: string;
10
+ Location?: string;
11
+ Columns?: TColumnDescription[];
12
+ /** bytes */
13
+ Content?: unknown;
14
+ }
@@ -0,0 +1,10 @@
1
+ export * from './schema';
2
+ export * from './shared';
3
+
4
+ export * from './cdcStream';
5
+ export * from './columnEntity';
6
+ export * from './externalDataSource';
7
+ export * from './externalTable';
8
+ export * from './persQueueGroup';
9
+ export * from './table';
10
+ export * from './tableIndex';
@@ -0,0 +1,191 @@
1
+ export interface TPersQueueGroupDescription {
2
+ Name: string;
3
+ /** uint64 */
4
+ PathId?: string;
5
+ TotalGroupCount: number;
6
+
7
+ PartitionsToAdd?: TPartitionToAdd[];
8
+ PartitionsToDelete?: number[];
9
+ NextPartitionId?: number;
10
+ PartitionPerTablet?: number;
11
+ PQTabletConfig: TPQTabletConfig;
12
+ Partitions?: TPartition[];
13
+ /** uint64 */
14
+ AlterVersion?: string;
15
+ /** uint64 */
16
+ BalancerTabletID?: string;
17
+
18
+ PartitionBoundaries?: unknown;
19
+
20
+ BootstrapConfig?: TBootstrapConfig;
21
+ }
22
+
23
+ export interface TPQTabletConfig {
24
+ /** uint64 */
25
+ CacheSize?: string;
26
+ PartitionConfig: TPQPartitionConfig;
27
+ /** @deprecated use Partitions */
28
+ PartitionIds?: number[];
29
+ TopicName?: string;
30
+ Version?: number;
31
+ LocalDC?: boolean;
32
+ RequireAuthWrite?: boolean;
33
+ RequireAuthRead?: boolean;
34
+ Producer?: string;
35
+ Ident?: string;
36
+ Topic?: string;
37
+ DC?: string;
38
+
39
+ ReadRules?: string[];
40
+ /** uint64[] */
41
+ ReadFromTimestampsMs?: number[];
42
+ /** uint64[] */
43
+ ConsumerFormatVersions?: number[];
44
+
45
+ ConsumerCodecs?: TCodecs[];
46
+ ReadRuleServiceTypes?: string;
47
+
48
+ /** uint64 */
49
+ FormatVersion?: string;
50
+ Codecs?: TCodecs;
51
+
52
+ /** uint64[] */
53
+ ReadRuleVersions?: string[];
54
+ /** uint64[] */
55
+ ReadRuleGenerations?: string[];
56
+
57
+ TopicPath?: string;
58
+
59
+ YcCloudId?: string;
60
+ YcFolderId?: string;
61
+ YdbDatabaseId?: string;
62
+ YdbDatabasePath?: string;
63
+ FederationAccount?: string;
64
+
65
+ PartitionKeySchema?: TKeyComponentSchema[];
66
+
67
+ Partitions?: TPartition[];
68
+
69
+ MeteringMode?: EMeteringMode;
70
+ }
71
+
72
+ export interface TPQPartitionConfig {
73
+ MaxCountInPartition?: number;
74
+ /** int64 */
75
+ MaxSizeInPartition?: string;
76
+ LifetimeSeconds: number;
77
+ /** uint64 */
78
+ StorageLimitBytes?: string;
79
+
80
+ ImportantClientId?: string[];
81
+ LowWatermark?: number;
82
+ SourceIdLifetimeSeconds?: number;
83
+ SourceIdMaxCounts?: number;
84
+
85
+ /** uint64 */
86
+ WriteSpeedInBytesPerSecond?: string;
87
+ /** uint64 */
88
+ BurstSize?: string;
89
+
90
+ ReadQuota?: TReadQuota[];
91
+ /** uint64 */
92
+ MaxWriteInflightSize?: string;
93
+ /** uint64 */
94
+ BorderWriteInflightSize?: string;
95
+
96
+ NumChannels?: number;
97
+
98
+ TotalPartitions?: number;
99
+
100
+ ExplicitChannelProfiles?: TChannelProfile[];
101
+
102
+ MirrorFrom?: TMirrorPartitionConfig;
103
+ }
104
+
105
+ interface TMirrorPartitionConfig {
106
+ Endpoint?: string;
107
+ EndpointPort?: number;
108
+ Topic?: string;
109
+ Consumer?: string;
110
+ /** uint64 */
111
+ ReadFromTimestampsMs?: string;
112
+ Credentials?: TCredentials;
113
+ Database?: string;
114
+ UseSecureConnection?: boolean;
115
+ SyncWriteTime?: boolean;
116
+ }
117
+
118
+ interface TChannelProfile {
119
+ PoolKind?: string;
120
+ /** uint64 */
121
+ Size?: string;
122
+ ReadIops?: number;
123
+ ReadBandwidth?: number;
124
+ WriteIops?: number;
125
+ WriteBandwidth?: number;
126
+ }
127
+
128
+ interface IamCredentials {
129
+ Endpoint?: string;
130
+ ServiceAccountKey?: string;
131
+ }
132
+
133
+ interface TCredentials {
134
+ OauthToken?: string;
135
+ JwtParams?: string;
136
+ Iam?: IamCredentials;
137
+ }
138
+
139
+ interface TBootstrapConfig {
140
+ ExplicitMessageGroups?: TMessageGroup[];
141
+ }
142
+
143
+ interface TMessageGroup {
144
+ // Id of message group (SourceId)
145
+ Id?: string;
146
+ // Range of the key to which it is allowed to write.
147
+ KeyRange?: TPartitionKeyRange;
148
+ }
149
+
150
+ interface TKeyComponentSchema {
151
+ Name?: string;
152
+ TypeId?: number;
153
+ }
154
+
155
+ interface TReadQuota {
156
+ ClientId?: string;
157
+ /** uint64 */
158
+ SpeedInBytesPerSecond?: string;
159
+ /** uint64 */
160
+ BurstSize?: string;
161
+ }
162
+
163
+ interface TPartition {
164
+ PartitionId?: number;
165
+ /** uint64 */
166
+ TabletId?: string;
167
+ KeyRange?: TPartitionKeyRange;
168
+ }
169
+
170
+ interface TPartitionToAdd {
171
+ PartitionId?: number;
172
+ GroupId?: number;
173
+ }
174
+
175
+ interface TCodecs {
176
+ /** int64 */
177
+ Ids?: string[];
178
+ Codecs?: string[];
179
+ }
180
+
181
+ interface TPartitionKeyRange {
182
+ // Inclusive left border. Emptiness means -inf.
183
+ FromBound?: string;
184
+ // Exclusive right border. Emptiness means +inf.
185
+ ToBound?: string;
186
+ }
187
+
188
+ export enum EMeteringMode {
189
+ METERING_MODE_RESERVED_CAPACITY = 'METERING_MODE_RESERVED_CAPACITY',
190
+ METERING_MODE_REQUEST_UNITS = 'METERING_MODE_REQUEST_UNITS',
191
+ }