- streetlightStreetlightIdCommandTurnon
Module which wraps functionality for the
streetlight/{streetlight_id}/command/turnon
channel
- NatsAsyncApiClient
NatsAsyncApiClient
The generated client based on your AsyncAPI document.
- NatsAsyncApiTestClient
NatsAsyncApiTestClient
The test/mirror client which is the reverse to the normal NatsAsyncApiClient.
Module which wraps functionality for the streetlight/{streetlight_id}/command/turnon
channel
Internal functionality to publish message to channel streetlight/{streetlight_id}/command/turnon
Kind: inner method of streetlightStreetlightIdCommandTurnon
Param | Description |
---|---|
message | to publish |
nc | to publish with |
codec | used to convert messages |
streetlight_id | parameter to use in topic |
options | to publish with |
Internal functionality to publish message to jetstream channel streetlight/{streetlight_id}/command/turnon
Kind: inner method of streetlightStreetlightIdCommandTurnon
Param | Description |
---|---|
message | to publish |
js | to publish with |
codec | used to convert messages |
streetlight_id | parameter to use in topic |
options | to publish with |
NatsAsyncApiClient
The generated client based on your AsyncAPI document.
Kind: global class
- NatsAsyncApiClient
- .connect(options)
- .disconnect()
- .isClosed()
- .connectWithUserCreds(userCreds, options)
- .connectWithUserPass(user, pass, options)
- .connectToHost(host, options)
- .connectToLocal()
- .publishToStreetlightStreetlightIdCommandTurnon(message, streetlight_id)
- .jetStreamPublishToStreetlightStreetlightIdCommandTurnon(message, streetlight_id)
Try to connect to the NATS server with the different payloads.
Kind: instance method of NatsAsyncApiClient
Param | Description |
---|---|
options | to use, payload is omitted if sat in the AsyncAPI document. |
Disconnect all clients from the server
Kind: instance method of NatsAsyncApiClient
Returns whether or not any of the clients are closed
Kind: instance method of NatsAsyncApiClient
Try to connect to the NATS server with user credentials
Kind: instance method of NatsAsyncApiClient
Param | Description |
---|---|
userCreds | to use |
options | to connect with |
Try to connect to the NATS server with user and password
Kind: instance method of NatsAsyncApiClient
Param | Description |
---|---|
user | username to use |
pass | password to use |
options | to connect with |
Try to connect to the NATS server which has no authentication
Kind: instance method of NatsAsyncApiClient
Param | Description |
---|---|
host | to connect to |
options | to connect with |
Connects the client to the AsyncAPI server called local. Local server used during development and testing
Kind: instance method of NatsAsyncApiClient
Publish to the streetlight/{streetlight_id}/command/turnon
channel
Channel for the turn on command which should turn on the streetlight
Kind: instance method of NatsAsyncApiClient
Param | Description |
---|---|
message | to publish |
streetlight_id | parameter to use in topic |
Publish to the streetlight/{streetlight_id}/command/turnon
jetstream channel
Channel for the turn on command which should turn on the streetlight
Kind: instance method of NatsAsyncApiClient
Param | Description |
---|---|
message | to publish |
streetlight_id | parameter to use in topic |
NatsAsyncApiTestClient
The test/mirror client which is the reverse to the normal NatsAsyncApiClient.
Kind: global class
- NatsAsyncApiTestClient
- .connect(options)
- .disconnect()
- .isClosed()
- .connectWithUserCreds(userCreds, options)
- .connectWithUserPass(user, pass, options)
- .connectToHost(host, options)
- .connectToLocal()
- .subscribeToStreetlightStreetlightIdCommandTurnon(onDataCallback, streetlight_id, flush, options)
- .jetStreamPullStreetlightStreetlightIdCommandTurnon(onDataCallback, streetlight_id, options)
- .jetStreamPushSubscribeToStreetlightStreetlightIdCommandTurnon(onDataCallback, streetlight_id, flush, options)
Try to connect to the NATS server with the different payloads.
Kind: instance method of NatsAsyncApiTestClient
Param | Description |
---|---|
options | to use, payload is omitted if sat in the AsyncAPI document. |
Disconnect all clients from the server
Kind: instance method of NatsAsyncApiTestClient
Returns whether or not any of the clients are closed
Kind: instance method of NatsAsyncApiTestClient
Try to connect to the NATS server with user credentials
Kind: instance method of NatsAsyncApiTestClient
Param | Description |
---|---|
userCreds | to use |
options | to connect with |
Try to connect to the NATS server with user and password
Kind: instance method of NatsAsyncApiTestClient
Param | Description |
---|---|
user | username to use |
pass | password to use |
options | to connect with |
Try to connect to the NATS server which has no authentication
Kind: instance method of NatsAsyncApiTestClient
Param | Description |
---|---|
host | to connect to |
options | to connect with |
Connects the client to the AsyncAPI server called local. Local server used during development and testing
Kind: instance method of NatsAsyncApiTestClient
natsAsyncApiTestClient.subscribeToStreetlightStreetlightIdCommandTurnon(onDataCallback, streetlight_id, flush, options)
Subscribe to the streetlight/{streetlight_id}/command/turnon
Channel for the turn on command which should turn on the streetlight
Kind: instance method of NatsAsyncApiTestClient
Param | Description |
---|---|
onDataCallback | to call when messages are received |
streetlight_id | parameter to use in topic |
flush | ensure client is force flushed after subscribing |
options | to subscribe with, bindings from the AsyncAPI document overwrite these if specified |
natsAsyncApiTestClient.jetStreamPullStreetlightStreetlightIdCommandTurnon(onDataCallback, streetlight_id, options)
JetStream pull function.
Pull message from streetlight/{streetlight_id}/command/turnon
Channel for the turn on command which should turn on the streetlight
Kind: instance method of NatsAsyncApiTestClient
Param | Description |
---|---|
onDataCallback | to call when messages are received |
streetlight_id | parameter to use in topic |
options | to pull message with, bindings from the AsyncAPI document overwrite these if specified |
natsAsyncApiTestClient.jetStreamPushSubscribeToStreetlightStreetlightIdCommandTurnon(onDataCallback, streetlight_id, flush, options)
Push subscription to the streetlight/{streetlight_id}/command/turnon
Channel for the turn on command which should turn on the streetlight
Kind: instance method of NatsAsyncApiTestClient
Param | Description |
---|---|
onDataCallback | to call when messages are received |
streetlight_id | parameter to use in topic |
flush | ensure client is force flushed after subscribing |
options | to subscribe with, bindings from the AsyncAPI document overwrite these if specified |