0.0.3 • Published 8 years ago

hiot-circuit-breaker v0.0.3

Weekly downloads
10
License
MIT
Repository
github
Last release
8 years ago

hiot-circuit-breaker

A promisified version of circuit-breaker-js

Usage

For options and default values, see https://github.com/yammer/circuit-breaker-js/blob/master/README.md.

var CircuitBreaker = require('hiot-circuit-breaker');

var breaker = new CircuitBreaker(/* options */);

var command = fetch('http://another-api.com/stuff');
var fallback = Promise.resolve('no stuff');

breaker.run(command, fallback)
  .then(x => console.log(x));
0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago