Skip to content

Latest commit

 

History

History
315 lines (219 loc) · 12.1 KB

File metadata and controls

315 lines (219 loc) · 12.1 KB

Modules

streetlightStreetlightIdCommandTurnon

Module which wraps functionality for the streetlight/{streetlight_id}/command/turnon channel

Classes

NatsAsyncApiClient

NatsAsyncApiClient

The generated client based on your AsyncAPI document.

NatsAsyncApiTestClient

NatsAsyncApiTestClient

The test/mirror client which is the reverse to the normal NatsAsyncApiClient.

streetlightStreetlightIdCommandTurnon

Module which wraps functionality for the streetlight/{streetlight_id}/command/turnon channel

streetlightStreetlightIdCommandTurnon~publish(message, nc, codec, streetlight_id, options)

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

streetlightStreetlightIdCommandTurnon~jetStreamPublish(message, js, codec, streetlight_id, options)

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

NatsAsyncApiClient

The generated client based on your AsyncAPI document.

Kind: global class

natsAsyncApiClient.connect(options)

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.

natsAsyncApiClient.disconnect()

Disconnect all clients from the server

Kind: instance method of NatsAsyncApiClient

natsAsyncApiClient.isClosed()

Returns whether or not any of the clients are closed

Kind: instance method of NatsAsyncApiClient

natsAsyncApiClient.connectWithUserCreds(userCreds, options)

Try to connect to the NATS server with user credentials

Kind: instance method of NatsAsyncApiClient

Param Description
userCreds to use
options to connect with

natsAsyncApiClient.connectWithUserPass(user, pass, options)

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

natsAsyncApiClient.connectToHost(host, options)

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

natsAsyncApiClient.connectToLocal()

Connects the client to the AsyncAPI server called local. Local server used during development and testing

Kind: instance method of NatsAsyncApiClient

natsAsyncApiClient.publishToStreetlightStreetlightIdCommandTurnon(message, streetlight_id)

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

natsAsyncApiClient.jetStreamPublishToStreetlightStreetlightIdCommandTurnon(message, streetlight_id)

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

NatsAsyncApiTestClient

The test/mirror client which is the reverse to the normal NatsAsyncApiClient.

Kind: global class

natsAsyncApiTestClient.connect(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.

natsAsyncApiTestClient.disconnect()

Disconnect all clients from the server

Kind: instance method of NatsAsyncApiTestClient

natsAsyncApiTestClient.isClosed()

Returns whether or not any of the clients are closed

Kind: instance method of NatsAsyncApiTestClient

natsAsyncApiTestClient.connectWithUserCreds(userCreds, options)

Try to connect to the NATS server with user credentials

Kind: instance method of NatsAsyncApiTestClient

Param Description
userCreds to use
options to connect with

natsAsyncApiTestClient.connectWithUserPass(user, pass, options)

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

natsAsyncApiTestClient.connectToHost(host, options)

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

natsAsyncApiTestClient.connectToLocal()

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