Skip to content

Releases: nodeshift/opossum

Adds CircuitBreaker#call() method

16 Oct 13:43
v4.1.0
57df828
Compare
Choose a tag to compare

This allows the user to control the this context within the function execution for a circuit. This method behaves in many ways like Function.prototype.call(). It takes a this context as the first parameter and any optional parameters as an argument list to the function. Here is an example usage:

const context = {
  lunch: 'sushi'
};

async function getLunch (param) {
  return param
    ? Promise.resolve(param)
    : Promise.resolve(this.lunch);
}
getLunch.lunch = 'tacos';

const circuit = new CircuitBreaker(getLunch);
circuit.call()
  .then(console.log) // logs 'tacos'
  .then(_ => {
    circuit.call(context)
      .then(console.log) // logs 'sushi'
      .then(_ => {
        circuit.call(context, 'burgers')
          .then(console.log); // logs 'burgers'
      });
  });

Extract metrics and remove factory function

21 Aug 22:32
v4.0.0
95114d3
Compare
Choose a tag to compare

4.0.0 (2019-08-21)

Breaking Changes

  • The factory function has been removed in favor of simply using the CircuitBreaker constructor.
  • Prometheus and Hystrix metrics have been moved into their own repositories.
  • We no longer keep a set of all circuits

DO NOT USE

21 Aug 22:28
v3.1.0
d29f3d4
Compare
Choose a tag to compare

Breaking changes were unintentionally pushed as a minor version release. Please either stick with 3.0.0 or bump to 4.0.0.

Version 3.0.0

26 Jul 15:35
Compare
Choose a tag to compare

3.0.0 (2019-07-26)

src

BREAKING CHANGES

  • Remove the Promisify function from the CircuitBreaker factory

  • Node has its own built-in promisify function that can be used instead.

Active Circuit Iterator

01 Jul 11:08
Compare
Choose a tag to compare

2.3.0 (2019-07-01)

Features

  • provide an Iterator of all active circuits (#344) (13616b0)

Prometheus Options and Browser Love

24 Jun 11:04
Compare
Choose a tag to compare

2.2.0 (2019-06-24)

Bug Fixes

  • ensure that including dist/opossum.js works in the browser (#341) (873deb5)

Features

Prometheus improvements

12 Jun 16:29
v2.1.0
454e4e4
Compare
Choose a tag to compare

2.1.0 (2019-06-12)

Features

  • add function to get metrics for all circuits (#328) (ff29f2e)
  • Add original function parameters to the failure and timeout events (#326) (f8918c4), closes #324

Prometheus integration

05 Jun 18:47
v2.0.0
6bb65a5
Compare
Choose a tag to compare

2.0.0 (2019-06-05)

Build System

  • use node 12 on ci/cd in addition to 8 and 10 (93f8008)

Features

  • prometheus client integration (282b467)

Breaking Changes

  • health-check-failed and semaphore-locked events have been changed to healthCheckFailed and semaphoreLocked respectively

Hystrix Deprecation

22 May 16:43
v1.11.1
96ad8e3
Compare
Choose a tag to compare

Hystrix is now deprecated. We will soon be doing a major version bump to 2.0.0 adding Prometheus metrics, and changing some of the event names.

Filtering Errors

14 Mar 17:51
v1.11.0
ba05ab2
Compare
Choose a tag to compare

1.11.0 (2019-03-14)

Features

  • add errorFilter option to bypass incrementing failure stats (8018012)