feathers-opossum
![Known Vulnerabilities](https://snyk.io/test/npm/feathers-opossum/badge.svg)
feathers-opossum is a circuit breaker for Feathers adapters. It implements the opossum module.
npm install feathers-opossum --save
API
service(options)
const service = require('service');
const opossumService = require('feathers-opossum');
const options = {
opossum: {
timeout: 200,
errorThresholdPercentage: 50,
resetTimeout: 30000
},
fallback: () => {
errro: 'Sorry, out of service right now';
},
onFallback: result => reportFallbackEvent(result),
methods: ['find', 'get'],
};
const circuitedService = opossumService(service, {id:'_id', paginate: {max:10 }, options);
app.use('/may-fail', circuitedService);
Changelog
0.1.0
...
License
Copyright (c) 2020
Licensed under the MIT license.