Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@cloudnative/health-connect
Advanced tools
Cloud Health Connect provides a Connect Middleware for use in Express.js, Loopback and other frameworks that uses Cloud Health to provide:
to enable applications for use with Kubernetes and Cloud Foundry based clouds.
Cloud Health Connect takes the status reported by Cloud Health and makes it available on the liveness and/or readiness URL endpoints that the middleware is configured to use.
The middleware writes the data returned by the Cloud Health module as JSON, and sets the HTTP Status Code as follows:
Cloud Health Status | Readiness Status Code | Liveness Status Code | Combined Health Status Code |
---|---|---|---|
STARTING | 503 UNAVAILABLE | 200 OK | 503 UNAVAILABLE |
UP | 200 OK | 200 OK | 200 OK |
DOWN | 503 UNAVAILABLE | 503 UNAVAILABLE | 503 UNAVAILABLE |
STOPPING | 503 UNAVAILABLE | 503 UNAVAILABLE | 503 UNAVAILABLE |
STOPPED | 503 UNAVAILABLE | 503 UNAVAILABLE | 503 UNAVAILABLE |
- | 500 SERVER ERROR | 500 SERVER ERROR | 500 SERVER ERROR |
npm install @cloudnative/health-connect
const health = require('@cloudnative/health-connect');
let healthcheck = new health.HealthChecker();
app.use('/live', health.LivenessEndpoint(healthcheck))
If no livessness checks are registered, this will report 200 OK
and UP
.
app.use('/ready', health.ReadinessEndpoint(healthcheck))
If no readiness checks are registered, this will report 200 OK
and UP
.
app.use('/health', health.HealthEndpoint(healthcheck))
If no readiness or liveness checks are registered, this will report 200 OK
and UP
.
For information on how to register startup, readiness, liveness and shutdown checks, see the Cloud Health documentation.
The difference between liveness and readiness endpoints is the purpose: readiness should be used to denote whether an application is "ready" to receive requests, and liveness should be used to denote whether an application is "live" (vs. in a state where it should be restarted.
The combined health endpoint is designed for cloud technologies, such as Cloud Foundry which only support a single endpoint for both liveness and readiness checking.
The Cloud Health Connect module is created in TypeScript and as such provides out of the box TypeScript support.
This module adopts the Module Long Term Support (LTS) policy, with the following End Of Life (EOL) dates:
Module Version | Release Date | Minimum EOL | EOL With | Status |
---|---|---|---|---|
2.x.x | May 2019 | April 2021 | Current | |
1.x.x | July 2018 | Dec 2019 | LTS |
FAQs
Connect middleware for Cloud Health
The npm package @cloudnative/health-connect receives a total of 10,266 weekly downloads. As such, @cloudnative/health-connect popularity was classified as popular.
We found that @cloudnative/health-connect demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.