Class AsyncSubscriber<Message>

Subscribe to an MessageSubscription as AsyncIterator. This is useful for GraphQL subscriptions.

Type Parameters

  • Message

Implements

  • AsyncIterableIterator<Message>
  • Closeable
  • AsyncDisposable

Constructors

Properties

abort: undefined | AbortSignal
bufferSize: number
fcfs: boolean
pullQueue: ArrayDeque<((value) => void)> = ...

Type declaration

    • (value): void
    • Parameters

      • value: IteratorResult<Message, any>

      Returns void

pushQueue: ArrayDeque<Message> = ...
running: boolean = true

Methods

  • Returns Promise<void>

  • Returns Promise<IteratorResult<Message, any>>

  • Returns Promise<IteratorResult<Message, any>>

  • Returns Promise<IteratorResult<Message, any>>

  • Parameters

    • error: unknown

    Returns Promise<IteratorResult<Message, any>>

Generated using TypeDoc