{"_id":"@aftonbladet/health-check","_rev":"6-629faac3330db7d1b483ed45193d889c","name":"@aftonbladet/health-check","description":"A simple Javascript round robin health checker","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1":{"name":"@aftonbladet/health-check","version":"0.0.1","description":"A simple Javascript round robin health checker","author":{"name":"Aftonbladet"},"license":"UNLICENSED","scripts":{"build":"babel src --out-dir lib --no-comments","lint":"eslint .","test":"jest","clean":"rimraf lib","prepublish":"npm run clean && npm run lint && npm test && npm run build","version":"npm publish","postversion":"git push --follow-tags"},"repository":{"type":"git","url":"https://github.schibsted.io/ab/health-check.git"},"engines":{"node":"^6","npm":"^3"},"files":["README.md","lib"],"main":"lib/index.js","jest":{"rootDir":"src"},"dependencies":{"node-fetch":"^1.6.3"},"devDependencies":{"babel-cli":"^6.9.0","babel-eslint":"^6.0.4","babel-preset-es2017":"^1.4.0","eslint":"^2.9.0","eslint-config-airbnb":"^9.0.1","eslint-plugin-import":"^1.8.0","fetch-mock":"^5.6.2","mockery":"^2.0.0","rimraf":"^2.5.2"},"gitHead":"c028885572e033e55031b22261acee8cce9cd177","_id":"@aftonbladet/health-check@0.0.1","_shasum":"4daedbd7fe349923aadb847866fd986f51a036e4","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"aftonbladet","email":"tobias.jarlund@aftonbladet.se"},"dist":{"shasum":"4daedbd7fe349923aadb847866fd986f51a036e4","tarball":"https://registry.npmjs.org/@aftonbladet/health-check/-/health-check-0.0.1.tgz","integrity":"sha512-1ZZjGaie9k+T8XEBENlMI/hbtHnLXMBkwnHZP1e/rBOlECUv6WPruiiToiVJf2HkhpBZsazpc6N0/Tp+XGWeTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCA9QtCuNRDW3QH/Nm084JQ8HV4E05izQ2UCGkzvo796AIhAKzXNY6Eh2BkQYf2UK+/xePQCmq1d4S7SwD3DJzv/Hbj"}]},"maintainers":[{"name":"aftonbladet","email":"tobias.jarlund@aftonbladet.se"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/health-check-0.0.1.tgz_1481756001717_0.4453233869280666"}},"0.0.2":{"name":"@aftonbladet/health-check","version":"0.0.2","description":"A simple Javascript round robin health checker","author":{"name":"Aftonbladet"},"license":"UNLICENSED","scripts":{"build":"babel src --out-dir lib --no-comments","lint":"eslint .","test":"jest","clean":"rimraf lib","prepublish":"npm run clean && npm run lint && npm test && npm run build","version":"npm publish","postversion":"git push --follow-tags"},"repository":{"type":"git","url":"https://github.schibsted.io/ab/health-check.git"},"engines":{"node":"^6","npm":"^3"},"files":["README.md","lib"],"main":"lib/index.js","jest":{"rootDir":"src"},"dependencies":{"node-fetch":"^1.6.3"},"devDependencies":{"babel-cli":"^6.9.0","babel-eslint":"^6.0.4","babel-preset-es2017":"^1.4.0","eslint":"^2.9.0","eslint-config-airbnb":"^9.0.1","eslint-plugin-import":"^1.8.0","fetch-mock":"^5.6.2","mockery":"^2.0.0","rimraf":"^2.5.2"},"gitHead":"7e7926e699c6f73abbac066bb35814d84617fff0","_id":"@aftonbladet/health-check@0.0.2","_shasum":"699634bd7a076ad612bd0f45de0c07e5350e4012","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"aftonbladet","email":"tobias.jarlund@aftonbladet.se"},"dist":{"shasum":"699634bd7a076ad612bd0f45de0c07e5350e4012","tarball":"https://registry.npmjs.org/@aftonbladet/health-check/-/health-check-0.0.2.tgz","integrity":"sha512-QSozMJSEQPqMCM0OAEW6//JoP1RdxQ9z78U6/9dRC/rNa+Taa5rDumYR5ou0sPiNmHrs7LPrzbUKDAPx/vLCYQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDZHzddtXS8HrIbUCpvkyka7BwJJGKBqZwVuXvVhDbrSAiBS1gwRgnQk4zH1GpS7C9tYvb9cV+S04RNMAuFZ3nqnRA=="}]},"maintainers":[{"name":"aftonbladet","email":"tobias.jarlund@aftonbladet.se"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/health-check-0.0.2.tgz_1481797109572_0.7335177431814373"}},"0.1.0":{"name":"@aftonbladet/health-check","version":"0.1.0","description":"A simple Javascript round robin health checker","author":{"name":"Aftonbladet"},"license":"UNLICENSED","scripts":{"build":"babel src --out-dir lib --no-comments","lint":"eslint .","test":"jest","clean":"rimraf lib","prepublish":"npm run clean && npm run lint && npm test && npm run build","version":"npm publish","postversion":"git push --follow-tags"},"repository":{"type":"git","url":"https://github.schibsted.io/ab/health-check.git"},"engines":{"node":"^6","npm":"^3"},"files":["README.md","lib"],"main":"lib/index.js","jest":{"rootDir":"src"},"dependencies":{"node-fetch":"^1.6.3"},"devDependencies":{"babel-cli":"^6.9.0","babel-eslint":"^6.0.4","babel-preset-es2017":"^1.4.0","eslint":"^2.9.0","eslint-config-airbnb":"^9.0.1","eslint-plugin-import":"^1.8.0","fetch-mock":"^5.6.2","mockery":"^2.0.0","rimraf":"^2.5.2"},"gitHead":"c9bf8b36207d4f4dca3e47295397df593a8545fd","_id":"@aftonbladet/health-check@0.1.0","_npmVersion":"5.4.2","_nodeVersion":"8.8.1","_npmUser":{"name":"aftonbladet","email":"tobias.jarlund@aftonbladet.se"},"dist":{"integrity":"sha512-trWhS05+U+DNVWiOGk33oHUTD4YGEs5coJUFeWsYm6msGZqvGg1i4FVTQQ/0Y1aR2qygUTjLsUur+fLl1OKkmw==","shasum":"ba61b750bb639cf50376296c2f44276e29a6311f","tarball":"https://registry.npmjs.org/@aftonbladet/health-check/-/health-check-0.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAJHksEfKVPL/Q/cX7Cb3aOCab/Ucf8jefbooxxNkhIxAiEAnQ1i0qR/kTAEaboMmTnwPiiF3J4pGzCaizPkFNHkgcc="}]},"maintainers":[{"name":"aftonbladet","email":"tobias.jarlund@aftonbladet.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/health-check-0.1.0.tgz_1516005983368_0.8141831904649734"}}},"readme":"# A simple Javascript round robin health checker\n\n## Install\n```bash\nnpm install @aftonbladet/health-check --save\n```\n\n## Usage\n\n### Simple initialization\n```js\nimport { initHealthCheck, isHealthy } from '@aftonbladet/health-check';\n\ninitHealthCheck({ healthCheckUrls: ['http://www.aftonbladet.se/'] });\n\nif (isHealthy()) {\n    // System is UP\n} else {\n    // System is DOWN!\n}\n```\n\nThis will initialize a health checker that checks `http://www.aftonbladet.se` every three seconds.\nIf any of five consecutive checks returns a status in the 200 to 299 range, the check is considered\nto be healthy.\n\n### Advanced initialization\n```js\nimport { initHealthCheck, isHealthy } from '@aftonbladet/health-check';\n\ninitHealthCheck({\n\thealthCheckUrls: ['http://www.aftonbladet.se/', 'https://www.aftonbladet.se/sportbladet'],\n\thealthCheckInterval, 1000,\n\tnumberOfChecks: 3,\n});\n\nif (isHealthy()) {\n    // System is UP\n} else {\n    // System is DOWN!\n}\n```\n\nThis will instead initialize a health checker that round robins through the URLs in `healthCheckUrls` every second.\nIf any of three consecutive checks returns a status in the 200 to 299 range, the check is considered\nto be healthy.\n\nThe following parameters are accepted by `initHealthCheck`:\n * **healthCheckUrls**            a list of URLs to check\n * **[healthCheckInterval=3000]** the time in ms to wait in between each URL to check\n * **[readTimeout=1000]**         the read timeout in ms used when checking the URLs\n * **[numberOfChecks=5]**         the size of the CHECKS array\n * **[logger=NOOP]**              a [https://github.schibsted.io/ab/logger](logger) instance if you want logging\n\n## Publish\n```bash\nnpm version major|minor|patch\n```\n","maintainers":[{"name":"aftonbladet","email":"tobias.jarlund@aftonbladet.se"}],"time":{"modified":"2022-06-12T14:21:14.139Z","created":"2016-12-14T22:53:22.522Z","0.0.1":"2016-12-14T22:53:22.522Z","0.0.2":"2016-12-15T10:18:31.490Z","0.1.0":"2018-01-15T08:46:24.229Z"},"repository":{"type":"git","url":"https://github.schibsted.io/ab/health-check.git"},"author":{"name":"Aftonbladet"},"license":"UNLICENSED","readmeFilename":"README.md"}