Serviced

Microservice dependency readiness probe
Usage
npm i serviced
const Serviced = require('serviced');
const service1 = {
name: 'db',
url: 'http://localhost:3000',
method: 'GET',
json: true,
maxDelay: 3000,
numberOfBackoffs: 3,
test(body) {
return body.foo === true;
},
};
const service2 = {
name: 'kube',
url: 'http://localhost:8080',
method: 'GET',
json: true,
maxDelay: 3000,
numberOfBackoffs: 3,
test(body) {
return body.bar === true;
},
};
const services = new Serviced(service1, service2);
services.then(() => {
});