1 | import { ChannelCredentials } from './channel-credentials';
|
2 | import { ChannelOptions } from './channel-options';
|
3 | import { Metadata } from './metadata';
|
4 | import { CallConfig } from './resolver';
|
5 | import { ServerSurfaceCall } from './server-call';
|
6 | import { ConnectivityState } from './connectivity-state';
|
7 | import { ChannelRef } from './channelz';
|
8 | import { LoadBalancingCall } from './load-balancing-call';
|
9 | import { CallCredentials } from './call-credentials';
|
10 | import { Call, StatusObject } from './call-interface';
|
11 | import { Deadline } from './deadline';
|
12 | import { ResolvingCall } from './resolving-call';
|
13 | import { RetryingCall } from './retrying-call';
|
14 | import { BaseSubchannelWrapper, SubchannelInterface } from './subchannel-interface';
|
15 | interface NoneConfigResult {
|
16 | type: 'NONE';
|
17 | }
|
18 | interface SuccessConfigResult {
|
19 | type: 'SUCCESS';
|
20 | config: CallConfig;
|
21 | }
|
22 | interface ErrorConfigResult {
|
23 | type: 'ERROR';
|
24 | error: StatusObject;
|
25 | }
|
26 | type GetConfigResult = NoneConfigResult | SuccessConfigResult | ErrorConfigResult;
|
27 | declare class ChannelSubchannelWrapper extends BaseSubchannelWrapper implements SubchannelInterface {
|
28 | private channel;
|
29 | private refCount;
|
30 | private subchannelStateListener;
|
31 | constructor(childSubchannel: SubchannelInterface, channel: InternalChannel);
|
32 | ref(): void;
|
33 | unref(): void;
|
34 | }
|
35 | export declare class InternalChannel {
|
36 | private readonly credentials;
|
37 | private readonly options;
|
38 | private readonly resolvingLoadBalancer;
|
39 | private readonly subchannelPool;
|
40 | private connectivityState;
|
41 | private currentPicker;
|
42 | |
43 |
|
44 |
|
45 |
|
46 | private configSelectionQueue;
|
47 | private pickQueue;
|
48 | private connectivityStateWatchers;
|
49 | private readonly defaultAuthority;
|
50 | private readonly filterStackFactory;
|
51 | private readonly target;
|
52 | |
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | private readonly callRefTimer;
|
60 | private configSelector;
|
61 | |
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 | private currentResolutionError;
|
69 | private readonly retryBufferTracker;
|
70 | private keepaliveTime;
|
71 | private readonly wrappedSubchannels;
|
72 | private callCount;
|
73 | private idleTimer;
|
74 | private readonly idleTimeoutMs;
|
75 | private readonly channelzEnabled;
|
76 | private readonly originalTarget;
|
77 | private readonly channelzRef;
|
78 | private readonly channelzTrace;
|
79 | private readonly callTracker;
|
80 | private readonly childrenTracker;
|
81 | constructor(target: string, credentials: ChannelCredentials, options: ChannelOptions);
|
82 | private getChannelzInfo;
|
83 | private trace;
|
84 | private callRefTimerRef;
|
85 | private callRefTimerUnref;
|
86 | private removeConnectivityStateWatcher;
|
87 | private updateState;
|
88 | throttleKeepalive(newKeepaliveTime: number): void;
|
89 | removeWrappedSubchannel(wrappedSubchannel: ChannelSubchannelWrapper): void;
|
90 | doPick(metadata: Metadata, extraPickInfo: {
|
91 | [key: string]: string;
|
92 | }): import("./picker").PickResult;
|
93 | queueCallForPick(call: LoadBalancingCall): void;
|
94 | getConfig(method: string, metadata: Metadata): GetConfigResult;
|
95 | queueCallForConfig(call: ResolvingCall): void;
|
96 | private enterIdle;
|
97 | private maybeStartIdleTimer;
|
98 | private onCallStart;
|
99 | private onCallEnd;
|
100 | createLoadBalancingCall(callConfig: CallConfig, method: string, host: string, credentials: CallCredentials, deadline: Deadline): LoadBalancingCall;
|
101 | createRetryingCall(callConfig: CallConfig, method: string, host: string, credentials: CallCredentials, deadline: Deadline): RetryingCall;
|
102 | createInnerCall(callConfig: CallConfig, method: string, host: string, credentials: CallCredentials, deadline: Deadline): Call;
|
103 | createResolvingCall(method: string, deadline: Deadline, host: string | null | undefined, parentCall: ServerSurfaceCall | null, propagateFlags: number | null | undefined): ResolvingCall;
|
104 | close(): void;
|
105 | getTarget(): string;
|
106 | getConnectivityState(tryToConnect: boolean): ConnectivityState;
|
107 | watchConnectivityState(currentState: ConnectivityState, deadline: Date | number, callback: (error?: Error) => void): void;
|
108 | /**
|
109 | * Get the channelz reference object for this channel. The returned value is
|
110 | * garbage if channelz is disabled for this channel.
|
111 | * @returns
|
112 | */
|
113 | getChannelzRef(): ChannelRef;
|
114 | createCall(method: string, deadline: Deadline, host: string | null | undefined, parentCall: ServerSurfaceCall | null, propagateFlags: number | null | undefined): Call;
|
115 | }
|
116 | export {};
|