micro-panda-transporter-nats

0.2.0 • Public • Published

NATS Transporter

API

constructor

params:

  • errorHandler - func(err)
  • timeout - default to 1 minute. if a method call does not receive any response for such a time, it fails.

define

define a method.

params:

  • name
  • handler - async func(input) => output

async call

call a method. should be called after started.

params:

  • name
  • input

returns

  • output

on

listen to events.

params:

  • name
  • [group]
  • handler - async func(input)

emit

emit event. should be called after started.

params:

  • name
  • input

async start

start the transporter.

params:

async stop

stop the transporter.

Readme

Keywords

none

Package Sidebar

Install

npm i micro-panda-transporter-nats

Weekly Downloads

3

Version

0.2.0

License

none

Last publish

Collaborators

  • zhaoyao91