@mimik/healthcheck
v2.2.1
Published
system display at start for mimik microservices
Downloads
358
Readme
healthcheck
Example
import { startupHealthInfo } from '@mimik/healthcheck';
// or
import healthcheck from '@mimik/healthcheck';healthcheck~startupHealthInfo(config, correlationId) ⇒ void
Generate service startup message.
Kind: inner method of healthcheck
Throws:
- TypeError When
configisnull/undefinedorconfig.serverSettingsis missing. - TypeError When
serverSettings.public.domainNameis falsy andserverSettings.ipis missing, becausehrefIdthen falls back toserverSettings.ip.public || serverSettings.ip.local.
Requires: module:@mimik/sumologic-winston-logger, module:@mimik/address-helper
| Param | Type | Description | | --- | --- | --- | | config | object | Configuration of the micro-service. | | config.serverSettings | object | Server settings object. | | config.serverSettings.name | string | Name of the micro-service. | | config.serverSettings.id | string | Id of the micro-service. | | config.serverSettings.port | number | Port the micro-service is listening on. | | config.serverSettings.basePath | string | Base path of the micro-service. | | config.serverSettings.public | object | Public address settings. | | config.serverSettings.public.domainName | string | Domain name of the micro-service. | | config.serverSettings.public.protocol | string | Protocol of the micro-service. | | correlationId | string | CorrelationId to display during startup. |
