Options
All
  • Public
  • Public/Protected
  • All
Menu

the envoy client for gRPC

Hierarchy

Indexable

the API signature, dynamic attached for each gRPC request

Index

Constructors

constructor

  • new EnvoyClient(address: string, credentials: ChannelCredentials, options?: undefined | object): EnvoyClient
  • A generic gRPC client. Primarily useful as a base class for generated clients

    Parameters

    • address: string

      Server address to connect to

    • credentials: ChannelCredentials

      Credentials to use to connect to the server

    • Optional options: undefined | object

      Options to apply to channel creation

    Returns EnvoyClient

Properties

Readonly envoyContext

envoyContext: EnvoyContext

the envoy context of this client

Readonly originalAddress

originalAddress: string

the original target remote address (hostname:port)

Methods

close

  • close(): void
  • Close this client.

    Returns void

getChannel

  • getChannel(): Channel
  • Return the underlying channel object for the specified client

    Returns Channel

    The channel

makeBidiStreamRequest

  • makeBidiStreamRequest<RequestType, ResponseType>(method: string, serialize: serialize<RequestType>, deserialize: deserialize<ResponseType>, metadata?: Metadata | null, options?: CallOptions | null): ClientDuplexStream<RequestType, ResponseType>
  • Make a bidirectional stream request with this method on the given channel.

    Type parameters

    • RequestType

    • ResponseType

    Parameters

    • method: string

      The name of the method to request

    • serialize: serialize<RequestType>

      The serialization function for inputs

    • deserialize: deserialize<ResponseType>

      The deserialization function for outputs

    • Optional metadata: Metadata | null

      Array of metadata key/value pairs to add to the call

    • Optional options: CallOptions | null

      Options map

    Returns ClientDuplexStream<RequestType, ResponseType>

    An event emitter for stream related events

makeClientStreamRequest

  • makeClientStreamRequest<RequestType, ResponseType>(method: string, serialize: serialize<RequestType>, deserialize: deserialize<ResponseType>, metadata: Metadata | null, options: CallOptions | null, callback: requestCallback<ResponseType>): ClientWritableStream<RequestType>
  • Make a client stream request to the given method, using the given serialize and deserialize functions, with the given argument.

    Type parameters

    • RequestType

    • ResponseType

    Parameters

    • method: string

      The name of the method to request

    • serialize: serialize<RequestType>

      The serialization function for inputs

    • deserialize: deserialize<ResponseType>

      The deserialization function for outputs

    • metadata: Metadata | null

      Array of metadata key/value pairs to add to the call

    • options: CallOptions | null

      Options map

    • callback: requestCallback<ResponseType>

      The callback to for when the response is received

    Returns ClientWritableStream<RequestType>

    An event emitter for stream related events

makeServerStreamRequest

  • makeServerStreamRequest<RequestType, ResponseType>(method: string, serialize: serialize<RequestType>, deserialize: deserialize<ResponseType>, argument: RequestType, metadata?: Metadata | null, options?: CallOptions | null): ClientReadableStream<ResponseType>
  • Make a server stream request to the given method, with the given serialize and deserialize function, using the given argument

    Type parameters

    • RequestType

    • ResponseType

    Parameters

    • method: string

      The name of the method to request

    • serialize: serialize<RequestType>

      The serialization function for inputs

    • deserialize: deserialize<ResponseType>

      The deserialization function for outputs

    • argument: RequestType

      The argument to the call. Should be serializable with serialize

    • Optional metadata: Metadata | null

      Array of metadata key/value pairs to add to the call

    • Optional options: CallOptions | null

      Options map

    Returns ClientReadableStream<ResponseType>

    An event emitter for stream related events

makeUnaryRequest

  • makeUnaryRequest<RequestType, ResponseType>(method: string, serialize: serialize<RequestType>, deserialize: deserialize<ResponseType>, argument: RequestType | null, metadata: Metadata | null, options: CallOptions | null, callback: requestCallback<ResponseType>): ClientUnaryCall
  • Make a unary request to the given method, using the given serialize and deserialize functions, with the given argument.

    Type parameters

    • RequestType

    • ResponseType

    Parameters

    • method: string

      The name of the method to request

    • serialize: serialize<RequestType>

      The serialization function for inputs

    • deserialize: deserialize<ResponseType>

      The deserialization function for outputs

    • argument: RequestType | null

      The argument to the call. Should be serializable with serialize

    • metadata: Metadata | null

      Metadata to add to the call

    • options: CallOptions | null

      Options map

    • callback: requestCallback<ResponseType>

      The callback to for when the response is received

    Returns ClientUnaryCall

    An event emitter for stream related events

waitForReady

  • waitForReady(deadline: Deadline, callback: (error: Error | null) => void): void
  • Wait for the client to be ready. The callback will be called when the client has successfully connected to the server, and it will be called with an error if the attempt to connect to the server has unrecoverablly failed or if the deadline expires. This function will make the channel start connecting if it has not already done so.

    Parameters

    • deadline: Deadline

      When to stop waiting for a connection.

    • callback: (error: Error | null) => void

      The callback to call when done attempting to connect.

        • (error: Error | null): void
        • Parameters

          • error: Error | null

          Returns void

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Private property
  • Private method
  • Property
  • Inherited property

Generated using TypeDoc