Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@rentspree/lightship
Advanced tools
A lightship module for support kubernetes liveness and readiness by @rentspree
This module is a simple wrapper of the original lightship library which helps to easily initialize the ready callback functions for multiple source of ready
interconnected services being used by the application (eg. database) or configuration loading of the application.
createReadiness
which help to split lightship signalReady
to multiple functions/health
/live
and /ready
as the original lightship does but listen on port 13000
by defaultenableLog
option to print lightship logsrandomPortOnLocal
to reserve random port behavior when the process is run on local as the original lightship does, default to false
npm install --save @rentspree/lightship
import createLightship from "@rentspree/lightship"
const { createReadiness } = createLightship()
const [ mongooseDbReady, expressReady, senecaReady ] = createReadiness(3)
// for mongoose connection
mongoose.connect(/* connectionString */)
mongoose.connection.on('connected', ()=> mongooseDbReady())
// for express
const app = express();
app.listen(3000, ()=> expressReady())
// for seneca
require('seneca')({ some_options: 123 })
.use('community-plugin-1', {some_config: SOME_CONFIG})
.use('community-plugin-2')
.listen(/* ... */)
.client(/* ... */)
.ready(()=> senecaReady())
in case of making service back to not ready state, we get functions by 2 ways ..
const [ mongooseDbReady ] = createReadiness()
// first way, return from ready function call
const mongooseNotReady = mongooseDbReady()
mongooseNotReady()
// second way, by property `toNotReady` of ready function
mongooseDbReady.toNotReady()
MIT © RentSpree
FAQs
liveness and readiness wrapper using lightship for node.js
The npm package @rentspree/lightship receives a total of 0 weekly downloads. As such, @rentspree/lightship popularity was classified as not popular.
We found that @rentspree/lightship 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.