|
| 1 | +import {EFlag} from './enums'; |
| 2 | +import {TPoolStats, TSystemStateInfo} from './nodes'; |
| 3 | +import {TTabletStateInfo} from './tablet'; |
| 4 | + |
| 5 | +export interface TTenants { |
| 6 | + Tenants?: TTenant[]; |
| 7 | +} |
| 8 | + |
| 9 | +export interface TTenantInfo { |
| 10 | + TenantInfo?: TTenant[]; |
| 11 | + Errors?: string[]; |
| 12 | +} |
| 13 | + |
| 14 | +export interface TTenant { |
| 15 | + Name: string; |
| 16 | + Id: string; |
| 17 | + Type: ETenantType; |
| 18 | + State: State; |
| 19 | + StateStats?: THiveDomainStatsStateCount[]; |
| 20 | + Metrics: TMetrics; |
| 21 | + NodeIds?: number[]; |
| 22 | + AliveNodes: number; |
| 23 | + Resources: TTenantResources; |
| 24 | + /** uint64 */ |
| 25 | + CreateTime: string; |
| 26 | + Owner: string; |
| 27 | + Users?: string[]; |
| 28 | + PoolStats?: TPoolStats[]; |
| 29 | + UserAttributes: Record<string, string>; |
| 30 | + Overall: EFlag; |
| 31 | + SystemTablets?: TTabletStateInfo[]; |
| 32 | + ResourceId: string; |
| 33 | + Tablets?: TTabletStateInfo[]; |
| 34 | + /** uint64 */ |
| 35 | + StorageAllocatedSize: string; |
| 36 | + /** uint64 */ |
| 37 | + StorageMinAvailableSize: string; |
| 38 | + Nodes?: TSystemStateInfo[]; |
| 39 | + /** uint64 */ |
| 40 | + MemoryUsed: string; |
| 41 | + /** uint64 */ |
| 42 | + MemoryLimit: string; |
| 43 | + /** double */ |
| 44 | + CoresUsed: number; |
| 45 | + /** uint64 */ |
| 46 | + StorageGroups: string; |
| 47 | +} |
| 48 | + |
| 49 | +interface THiveDomainStatsStateCount { |
| 50 | + VolatileState?: ETabletVolatileState; |
| 51 | + Count?: number; |
| 52 | +} |
| 53 | + |
| 54 | +interface TMetrics { |
| 55 | + /** uint64 */ |
| 56 | + CPU?: string; |
| 57 | + /** uint64 */ |
| 58 | + Memory?: string; |
| 59 | + /** uint64 */ |
| 60 | + Network?: string; |
| 61 | + /** uint64 */ |
| 62 | + Counter?: string; |
| 63 | + /** uint64 */ |
| 64 | + Storage?: string; |
| 65 | + /** uint64 */ |
| 66 | + ReadThroughput?: string; |
| 67 | + /** uint64 */ |
| 68 | + WriteThroughput?: string; |
| 69 | + /** uint64 */ |
| 70 | + ReadIops?: string; |
| 71 | + /** uint64 */ |
| 72 | + WriteIops?: string; |
| 73 | + |
| 74 | + GroupReadThroughput?: TThroughputRecord[]; |
| 75 | + GroupWriteThroughput?: TThroughputRecord[]; |
| 76 | + |
| 77 | + GroupReadIops?: TIopsRecord[]; |
| 78 | + GroupWriteIops?: TIopsRecord[]; |
| 79 | +} |
| 80 | + |
| 81 | +interface TThroughputRecord { |
| 82 | + GroupID?: number; |
| 83 | + Channel?: number; |
| 84 | + /** uint64 */ |
| 85 | + Throughput?: string; |
| 86 | +} |
| 87 | + |
| 88 | +interface TIopsRecord { |
| 89 | + GroupID?: number; |
| 90 | + Channel?: number; |
| 91 | + /** uint64 */ |
| 92 | + Iops?: string; |
| 93 | +} |
| 94 | + |
| 95 | +interface TTenantResources { |
| 96 | + Required?: TTenantResource[]; |
| 97 | + Allocated?: TTenantResource[]; |
| 98 | +} |
| 99 | + |
| 100 | +interface TTenantResource { |
| 101 | + Type: string; |
| 102 | + Zone: string; |
| 103 | + Kind: string; |
| 104 | + Count: number; |
| 105 | +} |
| 106 | + |
| 107 | +export enum ETenantType { |
| 108 | + 'UnknownTenantType' = 'UnknownTenantType', |
| 109 | + 'Domain' = 'Domain', |
| 110 | + 'Dedicated' = 'Dedicated', |
| 111 | + 'Shared' = 'Shared', |
| 112 | + 'Serverless' = 'Serverless', |
| 113 | +} |
| 114 | + |
| 115 | +enum State { |
| 116 | + 'STATE_UNSPECIFIED' = 'STATE_UNSPECIFIED', |
| 117 | + 'CREATING' = 'CREATING', |
| 118 | + 'RUNNING' = 'RUNNING', |
| 119 | + 'REMOVING' = 'REMOVING', |
| 120 | + 'PENDING_RESOURCES' = 'PENDING_RESOURCES', |
| 121 | + 'CONFIGURING' = 'CONFIGURING', |
| 122 | +} |
| 123 | + |
| 124 | +enum ETabletVolatileState { |
| 125 | + 'TABLET_VOLATILE_STATE_UNKNOWN' = 'TABLET_VOLATILE_STATE_UNKNOWN', |
| 126 | + 'TABLET_VOLATILE_STATE_STOPPED' = 'TABLET_VOLATILE_STATE_STOPPED', |
| 127 | + 'TABLET_VOLATILE_STATE_BOOTING' = 'TABLET_VOLATILE_STATE_BOOTING', |
| 128 | + 'TABLET_VOLATILE_STATE_STARTING' = 'TABLET_VOLATILE_STATE_STARTING', |
| 129 | + 'TABLET_VOLATILE_STATE_RUNNING' = 'TABLET_VOLATILE_STATE_RUNNING', |
| 130 | + '_TABLET_VOLATILE_STATE_BLOCKED' = '_TABLET_VOLATILE_STATE_BLOCKED', |
| 131 | +} |
0 commit comments