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

envoyContext

envoyContext: EnvoyContext

the envoy context of this client

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(method: string, serialize: serialize, deserialize: deserialize, metadata?: Metadata | null, options?: CallOptions | null): ClientDuplexStream
  • Make a bidirectional stream request with this method on the given channel.

    Parameters

    • method: string

      The name of the method to request

    • serialize: serialize

      The serialization function for inputs

    • deserialize: deserialize

      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

    An event emitter for stream related events

makeClientStreamRequest

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

    Parameters

    • method: string

      The name of the method to request

    • serialize: serialize

      The serialization function for inputs

    • deserialize: deserialize

      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

      The callback to for when the response is received

    Returns ClientWritableStream

    An event emitter for stream related events

makeServerStreamRequest

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

    Parameters

    • method: string

      The name of the method to request

    • serialize: serialize

      The serialization function for inputs

    • deserialize: deserialize

      The deserialization function for outputs

    • argument: any

      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

    An event emitter for stream related events

makeUnaryRequest

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

    Parameters

    • method: string

      The name of the method to request

    • serialize: serialize

      The serialization function for inputs

    • deserialize: deserialize

      The deserialization function for outputs

    • argument: any | 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

      The callback to for when the response is received

    Returns ClientUnaryCall

    An event emitter for stream related events

waitForReady

  • waitForReady(deadline: Deadline, callback: function): 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: function

      The callback to call when done attempting to connect.

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

          • error: Error | null

          Returns void

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc