Interface GrpcTransportOptions

Options for creating a gRPC stream transport instance.

Hierarchy

  • GrpcTransportOptions

Properties

debug: boolean

True to enable debug logging for this stream.

onChunk: ((chunk) => void)

Type declaration

    • (chunk): void
    • Callback for when a chunk of data is received.

      Parameters

      • chunk: Uint8Array

      Returns void

onEnd: ((error?) => void)

Type declaration

    • (error?): void
    • Callback for when the stream ends, with an error instance if it can be provided. Note that the present implementation does not consume errors, even if provided.

      Parameters

      • Optional error: Error

      Returns void

onHeaders: ((headers, status) => void)

Type declaration

    • (headers, status): void
    • Callback for when headers and status are received. The headers are a map of header names to values, and the status is the HTTP status code. If the connection could not be made, the status should be 0.

      Parameters

      • headers: {
            [key: string]: string | string[];
        }
        • [key: string]: string | string[]
      • status: number

      Returns void

url: URL

The gRPC method URL.