0.0.15 • Published 4 years ago
kuberhealthy v0.0.15
kuberhealthy-client 🩺
a simple, asynchronous javascript client for kuberhealthy synthetic checks.
install
npm i --save kuberhealthy
use:
const kh = require('kuberhealthy')
// Report failure. Returns Promise.
kh.ReportFailure(['example failure message'])
// Report success. Returns Promise.
kh.ReportSuccess()
NOTE: KH_REPORTING_URL must be set in your env. This is usually done automatically if running as 'khcheck' on kubernetes.
example:
const report = async () => {
try {
await kh.ReportSuccess()
} catch (e) {
console.error(e)
process.exit(1)
}
process.exit(0)
}
report()
credit:
- this client was inspired and based from kuberhealthy client js