marathon-event-bus-mock

0.1.3 • Public • Published

marathon-event-bus-mock

Package version Package downloads Package license Build Status

A server to mock Marathon's (Server Sent) Event Bus.

Installation

Install as a dependency like this:

npm install marathon-event-bus-mock --save

Usage

To launch a MarathonEventBusMockServer on port 8080, you can do the following:

"use strict";
 
// Use MarathonEventBusMockServer
const MarathonEventBusMockServer = require("marathon-event-bus-mock");
 
// Instantiate MarathonEventBusMockServer on port 8080
const server = new MarathonEventBusMockServer(8080);
 
// Send random events every 2000ms
server.sendEvents(2000);

By default, it will publish Marathon >=v1.4 events. As those differ from former versions, you can use

const server = new MarathonEventBusMockServer(8080, true);

to enable the legacy events.

Package Sidebar

Install

npm i marathon-event-bus-mock

Weekly Downloads

2

Version

0.1.3

License

MIT

Last publish

Collaborators

  • tobilg