Transport represents the underlying transport for a client. A transport implements a protocol, such as Connect or gRPC-web, and allows for the concrete clients to be independent of the protocol.

interface Transport {
    stream<I, O>(service, method, signal, timeoutMs, header, input, contextValues?): Promise<StreamResponse<I, O>>;
    unary<I, O>(service, method, signal, timeoutMs, header, input, contextValues?): Promise<UnaryResponse<I, O>>;
}

Methods

Methods

  • Call a streaming RPC - a method that takes zero or more input messages, and responds with zero or more output messages.

    Type Parameters

    Parameters

    Returns Promise<StreamResponse<I, O>>

  • Call a unary RPC - a method that takes a single input message, and responds with a single output message.

    Type Parameters

    Parameters

    Returns Promise<UnaryResponse<I, O>>

Generated using TypeDoc