
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
opossum-hystrix
Advanced tools
This module is deprecated.
This module provides Hystrix metrics for
opossum circuit breakers. To use
it with your circuit breakers, just pass them in to the HystrixStats
constructor.
A Hystrix Stream is available for use with a Hystrix Dashboard using the
HystrixStats#stream
property. This property provies a
Node.js Stream, making it straightforward
to create an Server Side Event stream that will be compliant with a Hystrix Dashboard.
Additional Reading: Hystrix Metrics Event Stream, Turbine, Hystrix Dashboard
This module would typically be used in an application that can provide an endpoint for the Hystrix Dashboard to monitor.
const CircuitBreaker = require('opossum');
const HystrixStats = require('opossum-hystrix');
const express = require('express');
const app = express();
app.use('/hystrix.stream', hystrixStream);
// create a couple of circuit breakers
const c1 = new CircuitBreaker(someFunction);
const c2 = new CircuitBreaker(someOtherfunction);
// Provide them to the constructor
const hystrixMetrics = new HystrixStats([c1, c2]);
// Provide a Server Side Event stream of metrics data
function hystrixStream (request, response) {
response.writeHead(200, {
'Content-Type': 'text/event-stream',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive'
});
response.write('retry: 10000\n');
response.write('event: connecttime\n');
hystrixMetrics.getHystrixStream().pipe(response);
};
}
FAQs
Hystrix metrics for opossum circuit breaker
We found that opossum-hystrix demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.