Class Stream<T, ClientType>

Stream implements an Asynchronous Iterable over messages received from a topic. As such can be used with constructs like for-await-of, yield*, array destructing, etc.

Type Parameters

  • T
  • ClientType = any

Constructors

Properties

callback: undefined | ((env) => Promise<void>)

Type declaration

    • (env): Promise<void>
    • Parameters

      • env: Envelope

      Returns Promise<void>

messages: T[]
onConnectionLost?: OnConnectionLostCallback
resolvers: ((value) => void)[]

Type declaration

    • (value): void
    • Parameters

      • value: IteratorResult<T, any>

      Returns void

subscriptionManager?: SubscriptionManager
topics: string[]

Methods