Quantcast
Channel: CNode:Node.js专业中文社区
Viewing all articles
Browse latest Browse all 14821

【egg】多进程模型 cluster-client 怎么启动了

$
0
0

看代码是扩展了agent和app的属性,但是没找到谁调用了cluster。。看了两天框架代码还是没懂怎么启动了

  cluster(clientClass, options) {
    options = options || {};
    // master will find a free port as the clusterPort
    options.port = this._options.clusterPort;
    // agent will always be the leader
    options.isLeader = true;
    options.logger = this.coreLogger;
    return cluster(clientClass, options);
  }

Viewing all articles
Browse latest Browse all 14821

Trending Articles