StreamResponse is used in interceptors to represent an ongoing call that has zero or more input messages, and zero or more output messages.

interface StreamResponse {
    header: Headers;
    message: AsyncIterable<O>;
    method: MethodInfo<I, O>;
    service: ServiceType;
    stream: true;
    trailer: Headers;
}

Type Parameters

Hierarchy

Properties

header: Headers

Headers received from the response.

message: AsyncIterable<O>

The output messages.

method: MethodInfo<I, O>

Metadata related to the service method that is being called.

service: ServiceType

Metadata related to the service that is being called.

stream: true

The stream property discriminates between UnaryResponse and StreamingConn.

trailer: Headers

Trailers received from the response. Note that trailers are only populated when the entirety of the response has been read.

Generated using TypeDoc