balanced-pool.d.ts 609 B

123456789101112131415161718
  1. import Pool from './pool'
  2. import Dispatcher from './dispatcher'
  3. import { URL } from 'url'
  4. export default BalancedPool
  5. declare class BalancedPool extends Dispatcher {
  6. constructor(url: string | string[] | URL | URL[], options?: Pool.Options);
  7. addUpstream(upstream: string | URL): BalancedPool;
  8. removeUpstream(upstream: string | URL): BalancedPool;
  9. upstreams: Array<string>;
  10. /** `true` after `pool.close()` has been called. */
  11. closed: boolean;
  12. /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
  13. destroyed: boolean;
  14. }