kubernetes-probes
Advanced tools
Comparing version 0.1.3 to 0.2.0
11
app.js
@@ -8,4 +8,6 @@ 'use strict'; | ||
var livenessFunctions = []; | ||
var readinessState = null; | ||
module.exports = { | ||
setReadiness: function(ready) {readinessState = ready;}, | ||
addReadinessFunction: function(readinessFunction, name) { | ||
@@ -74,2 +76,11 @@ if (!name) {name = "All";} | ||
}); | ||
} else if (readinessState !== null) { | ||
if (readinessState == true) { | ||
res.header("Content-Type", "text/plain"); | ||
res.status(200); | ||
res.send(JSON.stringify(results)); | ||
}else { | ||
res.status(400); | ||
res.send(JSON.stringify(results)); | ||
} | ||
} else { | ||
@@ -76,0 +87,0 @@ res.status(400); |
{ | ||
"name": "kubernetes-probes", | ||
"version": "0.1.3", | ||
"version": "0.2.0", | ||
"description": "Listener for health probes from kubernetes.", | ||
@@ -5,0 +5,0 @@ "private": false, |
@@ -74,2 +74,6 @@ # kubernetes-probes | ||
Name of this particular aspect of being lively. Default is "All". | ||
* `setReadiness(ready)` | ||
* `ready` - [REQUIRED] - boolean. | ||
If this function has been called, and `addReadinessFunction()` has not been called, | ||
then the most recent value of `ready` will be used to respond to a readiness probe. | ||
* `listen(port)` | ||
@@ -76,0 +80,0 @@ * `port` - [REQUIRED] - integer. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41521
11
107
83
2