commit | dfe9a52f707983854d7c9e76cc13ce78704b963b | [log] [tgz] |
---|---|---|
author | ChrisC <christophe.closset@intl.att.com> | Tue Sep 01 09:47:18 2020 +0200 |
committer | ChrisC <christophe.closset@intl.att.com> | Tue Sep 01 09:47:18 2020 +0200 |
tree | 9990c46249cf23712f46a6acc509752e6c09d7fa | |
parent | a148c94bfc2d7fc5f8ac2f62b617dca27672b2e0 [diff] |
Update INFO.yaml Update PTL and move lifecycle to Mature as approved by TSC Issue-ID: SDC-3243 Signed-off-by: ChrisC <christophe.closset@intl.att.com> Change-Id: I6349e5be6440149b7eb21f5d09f01f92bc873b45
sdc-pubsub npm package.
Installing using npm:
npm install sdc-pubsub
import {PluginPubSub} from 'sdc-pubsub'
<!-- index.html --> <script src="./node_modules/sdc-pubsub/dist/sdc-pubsub.js"></script>
// script.js var pubsub = window.sdcPubSub.PluginPubSub;
// eventsClientId = client id to be used by the event bus, received from query params // parentUrl = event bus location url for communication, received from query params // eventsToWaitFor = list of events names that the event hub should wait for their completion. // the client should send an "ACTION_COMPLETED" event to the hub in order to notify the event hub to continue with the flow. // For example: [ “CHECK_IN” ] var client = new PluginPubSub('eventsClientId, parentUrl, eventsToWaitFor')
client.notify(“READY”)
// When lisetning to event we have to specify the specific event we want to act once it being received. // eventData.type will hold the event name that was notified by someone else client.on((eventData,event) => { if(eventData.type == ”WINDOW_OUT”) { //do logic } } )
None.
None.
Copyright 2018 AT&T, Inc.
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0