UNPKG

coffee-core

Version:

Coffee IT API core library

21 lines (20 loc) 731 B
import { ClientConfigInterface } from './client-config.interface'; import { ConnectableClient } from './connectable-client.interface'; export declare class ClientConnector { private readonly config; private readonly client; private readonly serviceName; private readonly context; private statusSubscription?; private destroyed; private reconnectInFlight; constructor(config: ClientConfigInterface, client: ConnectableClient, serviceName: string, context: string); connect(): Promise<void>; private scheduleBackgroundReconnect; destroy(): void; private watchStatusIfSupported; private handleDisconnect; private connectWithRetry; private getRetryTime; private sleep; }