Plugin

Interface for Chakra Plugins

All Chakra plugins must implement this interface.

Parameters

  1. options: Object (={}):  
    Configuration for the plugin

instance

Plugin.prototype.start

start(): undefined

Start the plugin. Would be called when the plugin is registered.

Returns

Throws

Error Will throw if plugin initialization failed

Plugin.prototype.handleMessage

handleMessage(subscription: String, message: String): undefined

Called when a new message arrives from a subscription

Parameters

  1. subscription: String:  
    Name of the subscription that published the message
  2. message: String:  
    JSON message object sent from the subscription

Returns