af-consul
Advanced tools
Comparing version 1.0.48 to 1.0.49
{ | ||
"name": "af-consul", | ||
"version": "1.0.48", | ||
"version": "1.0.49", | ||
"description": "A highly specialized function library", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/src/index.js", |
@@ -7,4 +7,4 @@ ## Not of interest to third party users | ||
const registerOptions = { | ||
name: 'serviceName', // (String): service name | ||
id: 'serviceID', // (String, optional): service ID | ||
name: 'service name', // (String): service name | ||
id: 'service ID', // (String, optional): service ID | ||
tags: ['tag1'], // (String[], optional): service tags | ||
@@ -55,4 +55,4 @@ address: '0.0.0.0', // (String, optional): service IP address | ||
const instance = 'msk'; // Суффикс в имени consul-сервиса | ||
const serviceName = `${process.env.SERVICE_NAME || 'test-service'}-${instance}`; | ||
export const thisServiceId = `${isProd ? 'prd' : 'dev'}-${isProd ? 'cepr01' : 'cep'}-${serviceName}`.toLowerCase(); | ||
const serviceNS = `${process.env.SERVICE_NAME || 'test-service'}-${instance}`; | ||
export const thisServiceId = `${isProd ? 'prd' : 'dev'}-${isProd ? 'cepr01' : 'cep'}-${serviceNS}`.toLowerCase(); | ||
@@ -70,3 +70,3 @@ const registerConfig: IRegisterOptions = { | ||
check: { | ||
name: `Service '${serviceName}'`, | ||
name: `Service '${serviceNS}'`, | ||
interval: '10s', | ||
@@ -73,0 +73,0 @@ timeout: '5s', |
57088