Skip to content

Eats things that happen too many times per time window. A time window in this case is a sliding window.

Notifications You must be signed in to change notification settings

iphands/event-horizon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

event-horizon

NPM version Downloads

Eats things that happen too many times per time window. A time window in this case is a sliding window.

Example

Simple

var horizon = require('event-horizon').instance({window: 200, max: 50});
horizon.run(function () {
    request(...);
});

With a callback

var horizon = require('event-horizon').instance({window: 200, max: 50});
horizon.run(function () {
    request(...);
}, function () {
    deferred.reject();
});

About

Eats things that happen too many times per time window. A time window in this case is a sliding window.

Resources

Stars

Watchers

Forks

Packages

No packages published