Refactored connection pool (#913)
* Refactored ConnectionPool - Created BaseConnectionPool class - Created CloudConnectionPool - connection pool updates are immutable - resurrect now happens inside getConnection() * Rewritten connection pool(s) type definitions * Updated test * Fixed test * Fix if check * Removed old files * Improve code coverage * Updated license header * Fix if check * Improve code coverage * Updated coverage script
This commit is contained in:
committed by
delvedor
parent
90be646658
commit
8e86450aeb
6
lib/Transport.d.ts
vendored
6
lib/Transport.d.ts
vendored
@ -2,7 +2,7 @@
|
||||
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
// See the LICENSE file in the project root for more information
|
||||
|
||||
import ConnectionPool from './ConnectionPool';
|
||||
import { ConnectionPool, CloudConnectionPool } from './pool';
|
||||
import Connection from './Connection';
|
||||
import Serializer from './Serializer';
|
||||
|
||||
@ -23,7 +23,7 @@ declare type emitFn = (event: string | symbol, ...args: any[]) => boolean;
|
||||
|
||||
interface TransportOptions {
|
||||
emit: emitFn & noopFn;
|
||||
connectionPool: ConnectionPool;
|
||||
connectionPool: ConnectionPool | CloudConnectionPool;
|
||||
serializer: Serializer;
|
||||
maxRetries: number;
|
||||
requestTimeout: number | string;
|
||||
@ -113,7 +113,7 @@ export default class Transport {
|
||||
DEFAULT: string;
|
||||
};
|
||||
emit: emitFn & noopFn;
|
||||
connectionPool: ConnectionPool;
|
||||
connectionPool: ConnectionPool | CloudConnectionPool;
|
||||
serializer: Serializer;
|
||||
maxRetries: number;
|
||||
requestTimeout: number;
|
||||
|
||||
Reference in New Issue
Block a user