commit | f817b1b1b901873f2f3e567d0622c79da01110cf | [log] [tgz] |
---|---|---|
author | MichaelMorris <michael.morris@est.tech> | Tue May 11 16:47:26 2021 +0100 |
committer | Michael Morris <michael.morris@est.tech> | Fri May 14 09:27:13 2021 +0000 |
tree | d015e474853cf0aabec9d319a44ea11aea167a97 | |
parent | 00ac6f8c49a5a63643dc3cec0a00a56b2a7edcb7 [diff] |
Update PTL in INFO.yaml Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-3544 Change-Id: I842df982962c37ce65d06a631e27e6923b449540
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