UNPKG

757 BJavaScriptView Raw
1/**
2 * clouds
3 *
4 * @author 老雷<leizongmin@gmail.com>
5 */
6
7// 默认心跳周期,单位:秒
8exports.heartbeat = 5;
9
10// 默认调用超时,单位:秒
11exports.timeout = 60;
12
13// 本地可用服务器列表缓存时间,单位:秒
14exports.serverMaxAge = 60;
15
16// 默认onRetry函数
17exports.onRetry = function () {
18 var args = Array.prototype.slice.call(arguments);
19 var callback = args.pop();
20 callback.apply(null, args);
21};
22
23// 默认Redis连接地址
24exports.redisHost = '127.0.0.1';
25exports.redisPort = 6379;
26exports.redisDb = 0;
27exports.redisPrefix = 'clouds';
28
29// 触发listen事件的延时时间,单位:毫秒
30exports.emitListenDelay = 200;
31
32// exit时关闭连接的延时时间,单位:毫秒
33exports.exitConnectionDelay = 200;