import type { EFlag } from './enums'; import type { Erasure } from './storage'; import type { TTabletStateInfo } from './tablet'; /** * endpoint: viewer/json/cluster * * source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/viewer/protos/viewer.proto */ export interface TClusterInfoV1 { error?: string; Overall?: EFlag; NodesTotal?: number; NodesAlive?: number; NumberOfCpus?: number; RealNumberOfCpus?: number; /** double */ LoadAverage?: number; /** uint64 */ MemoryTotal?: string; /** uint64 */ MemoryUsed?: string; /** uint64 */ StorageTotal?: string; /** uint64 */ StorageUsed?: string; DataCenters?: string[]; Versions?: string[]; SystemTablets?: TTabletStateInfo[]; /** uint64 */ Hosts?: string; /** uint64 */ Tenants?: string; /** uint64 */ Tablets?: string; /** Cluster root database */ Domain?: string; } export interface TStorageStats { PDiskFilter?: string; ErasureSpecies?: Erasure; CurrentAvailableSize?: string; /** uint64 */ CurrentAllocatedSize?: string; CurrentGroupsCreated?: number; AvailableGroupsToCreate?: number; } export interface TClusterInfoV2 extends TClusterInfoV1 { MapDataCenters?: { [key: string]: number; }; MapNodeRoles?: { [key: string]: number; }; MapNodeStates?: Partial>; /** value is uint64 */ MapStorageTotal?: { [key: string]: string; }; /** value is uint64 */ MapStorageUsed?: { [key: string]: string; }; MapVersions?: { [key: string]: number; }; StorageStats?: TStorageStats[]; Version?: number; /** value is uint64 */ CoresUsed?: string; CoresTotal?: number; } export interface TClusterInfoV5 extends TClusterInfoV2 { /** value is float */ NetworkUtilization?: number; /** value is uint64 */ NetworkWriteThroughput?: string; BridgeInfo?: TBridgeInfo; } export type TClusterInfo = TClusterInfoV1 | TClusterInfoV2 | TClusterInfoV5; export declare function isClusterInfoV2(info?: TClusterInfo): info is TClusterInfoV2; export declare function isClusterInfoV5(info?: TClusterInfo): info is TClusterInfoV5; export declare enum BridgePileState { UNSPECIFIED = "UNSPECIFIED", PRIMARY = "PRIMARY", PROMOTED = "PROMOTED", SYNCHRONIZED = "SYNCHRONIZED", NOT_SYNCHRONIZED = "NOT_SYNCHRONIZED", SUSPENDED = "SUSPENDED", DISCONNECTED = "DISCONNECTED" } export declare enum BridgePileGroupStatus { UNKNOWN = "UNKNOWN", FULL = "FULL", PARTIAL = "PARTIAL", DEGRADED = "DEGRADED", DISINTEGRATED = "DISINTEGRATED" } export interface TBridgePile { /** unique pile identifier */ PileId?: number; /** pile name, e.g., r1 */ Name?: string; /** pile state from backend */ State?: BridgePileState; /** number of nodes in the pile */ Nodes?: number; /** storage group statuses in the pile */ GroupStatuses?: Partial>; } export interface TBridgeInfo { Piles?: TBridgePile[]; }