1 | import { SubchannelRef } from './channelz';
|
2 | import { ConnectivityState } from './connectivity-state';
|
3 | import { Subchannel } from './subchannel';
|
4 | export type ConnectivityStateListener = (subchannel: SubchannelInterface, previousState: ConnectivityState, newState: ConnectivityState, keepaliveTime: number) => void;
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | export interface SubchannelInterface {
|
15 | getConnectivityState(): ConnectivityState;
|
16 | addConnectivityStateListener(listener: ConnectivityStateListener): void;
|
17 | removeConnectivityStateListener(listener: ConnectivityStateListener): void;
|
18 | startConnecting(): void;
|
19 | getAddress(): string;
|
20 | throttleKeepalive(newKeepaliveTime: number): void;
|
21 | ref(): void;
|
22 | unref(): void;
|
23 | getChannelzRef(): SubchannelRef;
|
24 | |
25 |
|
26 |
|
27 | getRealSubchannel(): Subchannel;
|
28 | |
29 |
|
30 |
|
31 |
|
32 |
|
33 | realSubchannelEquals(other: SubchannelInterface): boolean;
|
34 | }
|
35 | export declare abstract class BaseSubchannelWrapper implements SubchannelInterface {
|
36 | protected child: SubchannelInterface;
|
37 | constructor(child: SubchannelInterface);
|
38 | getConnectivityState(): ConnectivityState;
|
39 | addConnectivityStateListener(listener: ConnectivityStateListener): void;
|
40 | removeConnectivityStateListener(listener: ConnectivityStateListener): void;
|
41 | startConnecting(): void;
|
42 | getAddress(): string;
|
43 | throttleKeepalive(newKeepaliveTime: number): void;
|
44 | ref(): void;
|
45 | unref(): void;
|
46 | getChannelzRef(): SubchannelRef;
|
47 | getRealSubchannel(): Subchannel;
|
48 | realSubchannelEquals(other: SubchannelInterface): boolean;
|
49 | }
|