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 | export declare abstract class BaseSubchannelWrapper implements SubchannelInterface {
|
30 | protected child: SubchannelInterface;
|
31 | constructor(child: SubchannelInterface);
|
32 | getConnectivityState(): ConnectivityState;
|
33 | addConnectivityStateListener(listener: ConnectivityStateListener): void;
|
34 | removeConnectivityStateListener(listener: ConnectivityStateListener): void;
|
35 | startConnecting(): void;
|
36 | getAddress(): string;
|
37 | throttleKeepalive(newKeepaliveTime: number): void;
|
38 | ref(): void;
|
39 | unref(): void;
|
40 | getChannelzRef(): SubchannelRef;
|
41 | getRealSubchannel(): Subchannel;
|
42 | }
|