sdc-pubsub repository organize

Updated ignore files

Change-Id: I51af88117726507c8a1ed6b7c12e90ceb2e8f51b
Issue-ID: SDC-1537
Signed-off-by: Idan Amit <ia096e@intl.att.com>
4 files changed
tree: 845511c306aa27a48b480dbf932ee6c936d5ec83
  1. lib/
  2. .gitattributes
  3. .gitignore
  4. .gitreview
  5. .npmignore
  6. index.ts
  7. INFO.yaml
  8. LICENSE.TXT
  9. package.json
  10. README.md
  11. tsconfig.json
  12. version.properties
  13. webpack.config.js
README.md

sdc-pubsub

sdc-pubsub npm package.

Installation

Installing using npm:

npm install sdc-pubsub

Loading It Up

ES6

import {PluginPubSub} from 'sdc-pubsub'

ES5

var pluginPubSub = require('PluginPubSub')

Usage

Initialize a pubsub client

//eventsClientId=<received from query params>
//parentUrl=<received from query params>
//eventsToWaitFor = [ “CHECK_IN” ]

var client = new PluginPubSub('eventsClientId, parentUrl, eventsToWaitFor')

Notify about events

client.notify(“READY”)

Register for an event

client.on((eventData,event) => {
      if(eventData.type == WINDOW_OUT”) {
		             //do logic
       }
   }
)

Dependencies

  • None.

Tests

None.

Authors

Links

sdc onap wiki https://wiki.onap.org/x/_TX0

License

Copyright 2018 AT&T, Inc.

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0