UNPKG

mongodb-data-service

Version:
29 lines 1.27 kB
import type { UnboundDataServiceImplLogger } from './logger'; import connect from './connect'; import type { DataService } from './data-service'; import type { ConnectionOptions } from './connection-options'; import type { DevtoolsProxyOptions } from '@mongodb-js/devtools-proxy-support'; export declare class ConnectionAttempt { _abortController: AbortController; _closed: boolean; _connectFn: typeof connect; _dataService: DataService | null; _logger: UnboundDataServiceImplLogger; _proxyOptions: DevtoolsProxyOptions | undefined; constructor({ connectFn, logger, proxyOptions, }: { connectFn: typeof connect; logger: UnboundDataServiceImplLogger; proxyOptions?: DevtoolsProxyOptions; }); connect(connectionOptions: ConnectionOptions): Promise<DataService | void>; cancelConnectionAttempt(): void; isClosed(): boolean; _connect(connectionOptions: ConnectionOptions): Promise<DataService | void>; _close(): Promise<void>; } export declare function createConnectionAttempt({ logger, proxyOptions, connectFn, }: { logger: UnboundDataServiceImplLogger; proxyOptions: DevtoolsProxyOptions; connectFn?: typeof connect; }): ConnectionAttempt; //# sourceMappingURL=connection-attempt.d.ts.map