import { Initializer } from '@solid/community-server'; /** * Configuration for the Center node registration service. */ export interface CenterNodeRegistrationConfig { /** Database connection URL */ identityDbUrl: string; /** Server port (from CSS --port parameter) */ port?: number | string; /** Root file path (from CSS --rootFilePath parameter, for node ID persistence) */ rootFilePath?: string; /** Unique identifier for this node. Auto-generated if not provided. */ nodeId?: string; /** Display name for this node */ displayName?: string; /** Heartbeat interval in milliseconds (default: 30000) */ heartbeatInterval?: number; /** Whether the service is enabled (default: true) */ enabled?: boolean | string; } /** * Service that registers this Center node with the cluster on startup. * * This allows multiple Center nodes to discover each other and route * requests to the correct node based on Pod location. * * The service: * 1. Auto-detects internal IP and port * 2. Generates or loads a persistent node ID * 3. Registers with the shared database on startup * 4. Sends periodic heartbeats to indicate liveness */ export declare class CenterNodeRegistrationService extends Initializer { protected readonly logger: import("global-logger-factory").Logger; private readonly edgeNodeRepository; private readonly nodeId; private readonly displayName?; private readonly internalIp; private readonly internalPort; private readonly heartbeatInterval; private readonly nodeIdPath; private readonly enabled; private heartbeatTimer?; private token?; constructor(config: CenterNodeRegistrationConfig); /** * Get the current node's ID. */ getNodeId(): string; /** * Get the current node's internal endpoint. */ getInternalEndpoint(): { ip: string; port: number; }; /** * Initialize the service: register with the cluster and start heartbeat. */ handle(): Promise; /** * Auto-detect internal IP address. * Priority: * 1. K8s POD_IP environment variable * 2. First non-localhost IPv4 address from network interfaces */ private detectInternalIp; /** * Normalize port from string/number. */ private normalizePort; /** * Load node ID from persistent storage, or generate a new one. */ private loadOrGenerateNodeId; /** * Start periodic heartbeat to indicate liveness. */ private startHeartbeat; /** * Stop the heartbeat timer (for graceful shutdown). */ stopHeartbeat(): void; /** * List all center nodes in the cluster (for discovery). */ listClusterNodes(): Promise>; /** * Get the internal URL for a specific node. */ getNodeInternalUrl(nodeId: string): Promise; /** * Normalize boolean values from string/boolean. */ private normalizeBoolean; }