1.1.0 • Published 6 years ago
estreamer v1.1.0
Event Streamer
This is a simple implementation of a event streaming client. This client would connect to a EventBus and subscribe/publish events.
Usage
To use the event streamer you will first have to require it in and call the constructor, as shown below.
const EventClient = require('EventStreamer');
const Seeker = new EventClient("127.0.0.1", 7070);The constructor takes 2 parameters the first being a Host and the second being the Port which the client should try and connect to.
Parameter List
Hostis a String
Portis a integer
Methods
Subscribe(_eName)
This method will send a event to the EventBus with the service that the client wishes to subscribe to.
Seeker.Subscribe("Example");Parameter List
_eNameis a String
Publish(_eName, _eData)
This method will send a event with any data to the EventBus with the service that the client wishes to publish to.
Seeker.Publish("Example", {Msg: "Sample_Event_Publish"})Parameter List
_eNameis a String
_eDatais a Any