INNER CODE UNIT · JavaScript

noop

godaddy/terminus · lib/terminus.js:71

function noop () {}

function decorateWithHealthCheck (server, state, options) {
  const { healthChecks, logger, headers, onSendFailureDuringShutdown, sendFailuresDuringShutdown, caseInsensitive, statusOk, statusOkResponse, statusError, statusErrorResponse } = options

  let hasSetHandler = false
  const createHandler = (listener) => {
    const check = hasSetHandler
      ? () => {}
      : async (healthCheck, res) => {
        if (state.isShuttingDown && sendFailuresDuringShutdown) {
          return sendFailure(res, { onSendFailureDuringShutdown, statusError, statusErrorResponse })
        }
        let info
        try {
          info = await healthCheck({ state })
        } catch (error) {
          logger('healthcheck failed', error)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…