1 | import { LoadBalancer, ChannelControlHelper, LoadBalancingConfig } from './load-balancer';
|
2 | import { SubchannelAddress } from './subchannel-address';
|
3 | export declare class PickFirstLoadBalancingConfig implements LoadBalancingConfig {
|
4 | getLoadBalancerName(): string;
|
5 | constructor();
|
6 | toJsonObject(): object;
|
7 | static createFromJson(obj: any): PickFirstLoadBalancingConfig;
|
8 | }
|
9 | export declare class PickFirstLoadBalancer implements LoadBalancer {
|
10 | private readonly channelControlHelper;
|
11 | |
12 |
|
13 |
|
14 | private latestAddressList;
|
15 | |
16 |
|
17 |
|
18 |
|
19 | private subchannels;
|
20 | |
21 |
|
22 |
|
23 | private currentState;
|
24 | |
25 |
|
26 |
|
27 |
|
28 | private currentSubchannelIndex;
|
29 | private subchannelStateCounts;
|
30 | |
31 |
|
32 |
|
33 |
|
34 |
|
35 | private currentPick;
|
36 | |
37 |
|
38 |
|
39 |
|
40 | private subchannelStateListener;
|
41 | |
42 |
|
43 |
|
44 | private pickedSubchannelStateListener;
|
45 | |
46 |
|
47 |
|
48 | private connectionDelayTimeout;
|
49 | private triedAllSubchannels;
|
50 | |
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | constructor(channelControlHelper: ChannelControlHelper);
|
58 | private startNextSubchannelConnecting;
|
59 | /**
|
60 | * Have a single subchannel in the `subchannels` list start connecting.
|
61 | * @param subchannelIndex The index into the `subchannels` list.
|
62 | */
|
63 | private startConnecting;
|
64 | private pickSubchannel;
|
65 | private updateState;
|
66 | private resetSubchannelList;
|
67 | /**
|
68 | * Start connecting to the address list most recently passed to
|
69 | * `updateAddressList`.
|
70 | */
|
71 | private connectToAddressList;
|
72 | updateAddressList(addressList: SubchannelAddress[], lbConfig: LoadBalancingConfig): void;
|
73 | exitIdle(): void;
|
74 | resetBackoff(): void;
|
75 | destroy(): void;
|
76 | getTypeName(): string;
|
77 | }
|
78 | export declare function setup(): void;
|