- Source:
Methods
-
getSubscription(channel, topic)
-
Get a subscription definition
Parameters:
Name Type Description channelstring topicstring - Source:
Returns:
The subscription definition
- Type
- object
-
once(channel [, topic] [, callback])
-
Subscribe to an event once
Parameters:
Name Type Argument Description channelstring The channel to subscribe to
topicstring <optional>
The topic to subscribe to
callbackcallback <optional>
What to do when you get the event
- Source:
Returns:
The subscription definition
- Type
- object
-
publish( [channel] [, topic] [, options])
-
Publish an event on the system bus
Parameters:
Name Type Argument Default Description channelstring <optional>
'2' The channel to publish to
topicstring <optional>
1 The topic to publish to
optionsobject <optional>
{} What to pass to the event
Properties
Name Type Argument Default Description haboolean <optional>
2 Test sub prop
- Source:
-
subscribe(channel, topic [, callback])
-
Subscribe to an event
Parameters:
Name Type Argument Description channelstring The channel to subscribe to
topicstring The topic to subscribe to
callbackcallback <optional>
What to do when you get the event
- Source:
Returns:
The subscription definition
- Type
- object