Code Monkey home page Code Monkey logo

circuit-breaker-js's People

Contributors

layterz avatar rupamroy avatar unindented avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

circuit-breaker-js's Issues

Use module.exports to use on node server-side

I would like to use it in my node/express REST app. Unfortunately at the moment I can't see the way to do it, the library seems to me focused on browser usage only. Would you accept a pull request that fixes this and adds server-side module.exports functionality?

Still alive?

@rlayte @unindented

I wanted to potentially use this module or something similar, however it appears no activity has been made on this project for awhile.

Has this module been official abandoned?

Thanks!

Catch errors in run()?

I recently discovered my implementation was throwing an exception before calling the success or failure methods. Personally I'd expect that circuit-breaker would take that to mean failure. How to reproduce:

var breaker = new CircuitBreaker();
breaker.run(function(success, failed) {
  throw new Error("uncaught error");
});

How I'm fixing this now:

var breaker = new CircuitBreaker();
breaker.run(function(success, failed) {
  try {
    throw new Error("example");
  } catch (e) {
    failed();
  }
});

Would it make sense to add this behavior to the circuit-breaker library?

Make timeoutDuration optional

Hello.

First thank you very much for implementing this library!

I would like to discuss the use case that I have: I set a timeout on the request and abort the request when it occurs, then I count such error to be a failure, so I don't really need timeoutDuration from the library.

I plan to set timeoutDuration to be 1 second later than my socket timeout, so it won't be triggered, but it seems to be a hack.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.