estreamer

1.1.0 • Public • Published

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

Host is a String

Port is 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

_eName is 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

_eName is a String

_eData is a Any

Readme

Keywords

Package Sidebar

Install

npm i estreamer

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

5.04 kB

Total Files

5

Last publish

Collaborators

  • killerducks