Options
All
  • Public
  • Public/Protected
  • All
Menu

A basic NATS event publisher.

Type parameters

  • TEvent: any = any

Hierarchy

  • NatsPublisher

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • Initializes a new instance of that class.

    Type parameters

    • TEvent: unknown = any

    Parameters

    • subject: string

      The subject.

    • client: NatsClient = ...

    Returns NatsPublisher<TEvent>

Properties

Readonly client

client: NatsClient = ...

Readonly subject

subject: string

Accessors

stan

  • get stan(): Stan
  • Gets the underlying raw client.

    Returns Stan

    The client.

Methods

publish

  • publish(data: TEvent): Promise<void>
  • Publishes data.

    Parameters

    • data: TEvent

      The data to publish.

    Returns Promise<void>

    The promise

Generated using TypeDoc