1 |
|
2 | import { CallCredentials } from './call-credentials';
|
3 | import { Call, InterceptingListener, MessageContext, StatusObject } from './call-interface';
|
4 | import { Status } from './constants';
|
5 | import { Deadline } from './deadline';
|
6 | import { InternalChannel } from './internal-channel';
|
7 | import { Metadata } from './metadata';
|
8 | import { CallConfig } from './resolver';
|
9 | export type RpcProgress = 'NOT_STARTED' | 'DROP' | 'REFUSED' | 'PROCESSED';
|
10 | export interface StatusObjectWithProgress extends StatusObject {
|
11 | progress: RpcProgress;
|
12 | }
|
13 | export interface LoadBalancingCallInterceptingListener extends InterceptingListener {
|
14 | onReceiveStatus(status: StatusObjectWithProgress): void;
|
15 | }
|
16 | export declare class LoadBalancingCall implements Call {
|
17 | private readonly channel;
|
18 | private readonly callConfig;
|
19 | private readonly methodName;
|
20 | private readonly host;
|
21 | private readonly credentials;
|
22 | private readonly deadline;
|
23 | private readonly callNumber;
|
24 | private child;
|
25 | private readPending;
|
26 | private pendingMessage;
|
27 | private pendingHalfClose;
|
28 | private ended;
|
29 | private serviceUrl;
|
30 | private metadata;
|
31 | private listener;
|
32 | private onCallEnded;
|
33 | constructor(channel: InternalChannel, callConfig: CallConfig, methodName: string, host: string, credentials: CallCredentials, deadline: Deadline, callNumber: number);
|
34 | private trace;
|
35 | private outputStatus;
|
36 | doPick(): void;
|
37 | cancelWithStatus(status: Status, details: string): void;
|
38 | getPeer(): string;
|
39 | start(metadata: Metadata, listener: LoadBalancingCallInterceptingListener): void;
|
40 | sendMessageWithContext(context: MessageContext, message: Buffer): void;
|
41 | startRead(): void;
|
42 | halfClose(): void;
|
43 | setCredentials(credentials: CallCredentials): void;
|
44 | getCallNumber(): number;
|
45 | }
|