export type WebSocketEndpoint = "sql" | "tmq"; export declare const WS_SQL_ENDPOINT: WebSocketEndpoint; export declare const WS_TMQ_ENDPOINT: WebSocketEndpoint; export declare class Address { host: string; port: number; constructor(host: string, port: number); } export declare class Dsn { scheme: string; username: string; password: string; addresses: Address[]; database: string; params: Map; endpoint: WebSocketEndpoint; constructor(scheme: string, username: string, password: string, addresses: Address[], database: string, params: Map, endpoint?: WebSocketEndpoint); toString(): string; path(): string; isAdapterHA(): boolean; } /** * Parse a multi-host TDengine WebSocket URL. * Format: ws://username:password@host1:port1,host2:port2,[::1]:port3/db?key=value */ export declare function parse(url: string): Dsn; export declare const DEFAULT_PORT = 6041; export declare const CLOUD_DEFAULT_PORT = 443; export declare function isCloudServiceHost(host: string): boolean; export declare function getDefaultPortForHost(host: string): number; export declare function parseDiscoveredEndpoints(instances: string[]): Address[]; export declare function mergeAddresses(existing: Address[], discovered: Address[]): Address[]; //# sourceMappingURL=dsn.d.ts.map