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 | |
---|
1 | import Pool from './pool'
|
---|
2 | import Dispatcher from './dispatcher'
|
---|
3 | import { URL } from 'url'
|
---|
4 |
|
---|
5 | export default BalancedPool
|
---|
6 |
|
---|
7 | type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
|
---|
8 |
|
---|
9 | declare 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.