Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Emitter

A helper class to emit CloudEvents within an application

Hierarchy

  • Emitter

Index

Constructors

Properties

Methods

Constructors

Properties

instance: undefined | EventEmitter = undefined

Singleton store

Methods

  • emitEvent<T>(event: CloudEvent<T>, ensureDelivery?: boolean): Promise<void>
  • Emit an event inside this application

    Type Parameters

    • T

    Parameters

    • event: CloudEvent<T>

      to emit

    • ensureDelivery: boolean = true

      fail the promise if one listener fails

    Returns Promise<void>

  • getInstance(): EventEmitter
  • on(event: "cloudevent" | "newListener" | "removeListener", listener: ((...args: any[]) => void)): void
  • Add a listener for eventing

    Parameters

    • event: "cloudevent" | "newListener" | "removeListener"

      type to listen to

    • listener: ((...args: any[]) => void)

      to call on event

        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

Generated using TypeDoc