UNPKG

@codai/cbd

Version:

Codai Better Database - High-Performance Vector Memory System with HPKV-inspired architecture and MCP server

65 lines 1.56 kB
/** * CBD Enterprise - Cluster Management * * TypeScript interface for the Rust-based CBD clustering system * Provides high-availability and distributed coordination capabilities */ export interface ClusterConfig { nodeId: string; bindAddress: string; clusterPeers: string[]; enableRaft: boolean; dataDir: string; } export interface ClusterNode { id: string; address: string; status: 'active' | 'inactive' | 'joining' | 'leaving'; role: 'leader' | 'follower' | 'candidate'; lastSeen: Date; } export interface ClusterState { leader?: string; nodes: ClusterNode[]; term: number; isHealthy: boolean; } /** * CBD Cluster Manager * * Manages distributed CBD cluster with Raft consensus */ export declare class CBDClusterManager { private config; private isInitialized; constructor(config: ClusterConfig); /** * Initialize the cluster manager */ initialize(): Promise<void>; /** * Join an existing cluster */ joinCluster(leaderAddress: string): Promise<void>; /** * Get current cluster state */ getClusterState(): Promise<ClusterState>; /** * Leave the cluster gracefully */ leaveCluster(): Promise<void>; /** * Check if this node is the cluster leader */ isLeader(): Promise<boolean>; /** * Get cluster health status */ getHealth(): Promise<{ healthy: boolean; details: string[]; }>; } export default CBDClusterManager; //# sourceMappingURL=cluster.d.ts.map