/** * Client Registration * * Handles auto-registration with a main server when this server * is started as a client/peer in a cluster. */ declare class ClientRegistration { private config; private heartbeatInterval; private registrationRetryTimeout; private registered; private serverId; /** * The local IP on the interface that ROUTES TO the main server, learned by * opening a TCP connection to it. Registering os.hostname() broke on * clusters where compute nodes report an FQDN the controller cannot * resolve (cri22cn416.cri.uchicago.edu vs the resolvable cri22cn416): * every controller→node fetch died as 500 "fetch failed" while heartbeats * (outbound) kept the allocation looking healthy. An IP needs no DNS at * all, and the interface that reaches the controller is the one the * controller can reach back on. */ private routableLocalAddress; /** * Initialize client registration from environment variables */ initFromEnv(localPort: number): Promise; /** * Register with the main server */ private register; /** * Start heartbeat interval */ private startHeartbeat; /** * Send heartbeat to main server */ private sendHeartbeat; /** * Unregister from main server (called on shutdown) */ shutdown(): Promise; /** * Check if we're running as a client (registered with main server) */ isClient(): boolean; /** * Get main server URL (if we're a client) */ getMainServerUrl(): string | null; } export declare const clientRegistration: ClientRegistration; export {};