source: imaps-frontend/node_modules/undici-types/balanced-pool.d.ts

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 961 bytes
Line 
1import Pool from './pool'
2import Dispatcher from './dispatcher'
3import { URL } from 'url'
4
5export default BalancedPool
6
7type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
8
9declare class BalancedPool extends Dispatcher {
10 constructor(url: string | string[] | URL | URL[], options?: Pool.Options);
11
12 addUpstream(upstream: string | URL): BalancedPool;
13 removeUpstream(upstream: string | URL): BalancedPool;
14 upstreams: Array<string>;
15
16 /** `true` after `pool.close()` has been called. */
17 closed: boolean;
18 /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
19 destroyed: boolean;
20
21 // Override dispatcher APIs.
22 override connect(
23 options: BalancedPoolConnectOptions
24 ): Promise<Dispatcher.ConnectData>;
25 override connect(
26 options: BalancedPoolConnectOptions,
27 callback: (err: Error | null, data: Dispatcher.ConnectData) => void
28 ): void;
29}
Note: See TracBrowser for help on using the repository browser.