UNPKG

whale-nest-nacos

Version:

If you are a nest micro service architecture, you can use the SDK, so as to realize service discovery based on nacos, distributed load balancing strategy

30 lines 1.58 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DEFAULT_PROTOCOL = exports.CONNECTTIMEOUT = exports.RESPONSETIMEOUT = exports.REQUESTTIMEOUT = exports.DEFAULT_INSTANCE_OPTIONS = exports.DEFAULT_LOADER = exports.DEFAULT_CONFIG_GROUP = exports.DEFAULT_GROUP = exports.DEFAULT_LOGGER_LEVEL = exports.GRPC_PROXY_SERVICE = exports.TIER_ENVIRON = exports.TIER_VERSION = exports.TIER_NAMESPACE = exports.WHALE_CLUSTER_INFO = exports.namespace = exports.serverAddress = void 0; const utils_1 = require("./utils"); exports.serverAddress = (0, utils_1.getNacosConfig)('serverAddress'); // nacos服务地址 exports.namespace = (0, utils_1.getNacosConfig)('namespace'); // namespace: 名称空间必须在服务器上存在 exports.WHALE_CLUSTER_INFO = process.env.WHALE_CLUSTER_INFO; // 当前BFF服务所在集群 exports.TIER_NAMESPACE = process.env.TIER_NAMESPACE; exports.TIER_VERSION = process.env.TIER_VERSION; exports.TIER_ENVIRON = process.env.TIER_ENVIRON; exports.GRPC_PROXY_SERVICE = 'grpc-proxy'; exports.DEFAULT_LOGGER_LEVEL = 'INFO'; exports.DEFAULT_GROUP = "GRPC"; exports.DEFAULT_CONFIG_GROUP = "HTTP"; exports.DEFAULT_LOADER = { keepCase: true, enums: String, longs: String, defaults: true, }; exports.DEFAULT_INSTANCE_OPTIONS = { namespace: exports.namespace, clusterName: exports.WHALE_CLUSTER_INFO, groupName: "GRPC", }; exports.REQUESTTIMEOUT = 120 * 1000; exports.RESPONSETIMEOUT = 120 * 1000; exports.CONNECTTIMEOUT = 120 * 1000; exports.DEFAULT_PROTOCOL = 'https'; //# sourceMappingURL=constant.js.map