Listener - nats : Listener

Represents a connection which will be used for subscription.

Constructor

__init

(Connection c)

  • c Connection
  • An already-established connection or configuration to create a new connection.

Methods

LifeCycle Methods

Methods

__gracefulStop

()

returns error?

__immediateStop

()

returns error?

Stops the listener in the lifecyle.

  • Return Type

    (error?)
  • error or ().

LifeCycle Methods

__attach

(service s, string? name)

returns error?

Binds the NATS consumer to a service.

Parameters

  • s service
  • Type descriptor of the service.

  • name string? - ()
  • Name of the service.

  • Return Type

    (error?)
  • Returns nil or the error upon failure to register the listener.

__start

()

returns error?

Starts the listener in the lifecyle.

  • Return Type

    (error?)
  • Error or ().