summaryrefslogtreecommitdiff
path: root/frontend-old/node_modules/@grpc/grpc-js/build/src/subchannel-call.d.ts
blob: 1a6bb17a3cc4971db6047a765f9bc68f27c1a160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/// <reference types="node" />
/// <reference types="node" />
import * as http2 from 'http2';
import { Status } from './constants';
import { InterceptingListener, MessageContext, StatusObject } from './call-interface';
import { CallEventTracker, Transport } from './transport';
export interface SubchannelCall {
    cancelWithStatus(status: Status, details: string): void;
    getPeer(): string;
    sendMessageWithContext(context: MessageContext, message: Buffer): void;
    startRead(): void;
    halfClose(): void;
    getCallNumber(): number;
}
export interface StatusObjectWithRstCode extends StatusObject {
    rstCode?: number;
}
export interface SubchannelCallInterceptingListener extends InterceptingListener {
    onReceiveStatus(status: StatusObjectWithRstCode): void;
}
export declare class Http2SubchannelCall implements SubchannelCall {
    private readonly http2Stream;
    private readonly callEventTracker;
    private readonly listener;
    private readonly transport;
    private readonly callId;
    private decoder;
    private isReadFilterPending;
    private isPushPending;
    private canPush;
    /**
     * Indicates that an 'end' event has come from the http2 stream, so there
     * will be no more data events.
     */
    private readsClosed;
    private statusOutput;
    private unpushedReadMessages;
    private mappedStatusCode;
    private finalStatus;
    private internalError;
    constructor(http2Stream: http2.ClientHttp2Stream, callEventTracker: CallEventTracker, listener: SubchannelCallInterceptingListener, transport: Transport, callId: number);
    onDisconnect(): void;
    private outputStatus;
    private trace;
    /**
     * On first call, emits a 'status' event with the given StatusObject.
     * Subsequent calls are no-ops.
     * @param status The status of the call.
     */
    private endCall;
    private maybeOutputStatus;
    private push;
    private tryPush;
    private handleTrailers;
    private destroyHttp2Stream;
    cancelWithStatus(status: Status, details: string): void;
    getStatus(): StatusObject | null;
    getPeer(): string;
    getCallNumber(): number;
    startRead(): void;
    sendMessageWithContext(context: MessageContext, message: Buffer): void;
    halfClose(): void;
}