@godaddy/terminus
Advanced tools
Comparing version 4.7.2 to 4.8.0
@@ -10,3 +10,3 @@ 'use strict' | ||
healthChecks: { | ||
'/health': () => Promise.resolve() | ||
'/health': ({ state }) => Promise.resolve({ state }) | ||
}, | ||
@@ -13,0 +13,0 @@ sendFailuresDuringShutdown: false, |
@@ -88,3 +88,3 @@ 'use strict' | ||
try { | ||
info = await healthCheck() | ||
info = await healthCheck({ state }) | ||
} catch (error) { | ||
@@ -91,0 +91,0 @@ logger('healthcheck failed', error) |
{ | ||
"name": "@godaddy/terminus", | ||
"version": "4.7.2", | ||
"version": "4.8.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -33,3 +33,4 @@ # terminus | ||
function healthCheck () { | ||
function healthCheck ({ state }) { | ||
// `state.isShuttingDown` (boolean) shows whether the server is shutting down or not | ||
return Promise.resolve( | ||
@@ -54,3 +55,3 @@ // optionally include a resolve value to be included as | ||
healthChecks: { | ||
'/healthcheck': healthCheck, // a function returning a promise indicating service health, | ||
'/healthcheck': healthCheck, // a function accepting a state and returning a promise indicating service health, | ||
verbatim: true, // [optional = false] use object returned from /healthcheck verbatim in response, | ||
@@ -57,0 +58,0 @@ __unsafeExposeStackTraces: true // [optional = false] return stack traces in error response if healthchecks throw errors |
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
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
26647
180