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 a method.
params:
- name
- handler - async func(input) => output
call a method. should be called after started.
params:
- name
- input
returns
- output
listen to events.
params:
- name
- [group]
- handler - async func(input)
emit event. should be called after started.
params:
- name
- input
start the transporter.
params:
- options - the same as that of node-nats.connect
stop the transporter.