Commit | Line | Data |
---|---|---|
6c2aa71d | 1 | <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>PoolOptions | poolifier - v4.0.12</title><meta name="description" content="Documentation for poolifier"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">poolifier - v4.0.12</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">poolifier</a></li><li><a href="PoolOptions.html">PoolOptions</a></li></ul><h1>Interface PoolOptions<Worker></h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Options for a poolifier pool.</p> |
86de0a2d | 2 | </div><div class="tsd-comment tsd-typography"></div></section><div class="tsd-signature"><span class="tsd-signature-keyword">interface </span><span class="tsd-kind-interface">PoolOptions</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PoolOptions.html#Worker">Worker</a><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><a class="tsd-kind-property" href="PoolOptions.html#enableEvents">enableEvents</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="PoolOptions.html#enableTasksQueue">enableTasksQueue</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="PoolOptions.html#env">env</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="PoolOptions.html#errorHandler">errorHandler</a><span class="tsd-signature-symbol">?: </span><a href="../types/ErrorHandler.html" class="tsd-signature-type tsd-kind-type-alias">ErrorHandler</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PoolOptions.html#Worker">Worker</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="PoolOptions.html#exitHandler">exitHandler</a><span class="tsd-signature-symbol">?: </span><a href="../types/ExitHandler.html" class="tsd-signature-type tsd-kind-type-alias">ExitHandler</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PoolOptions.html#Worker">Worker</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="PoolOptions.html#messageHandler">messageHandler</a><span class="tsd-signature-symbol">?: </span><a href="../types/MessageHandler.html" class="tsd-signature-type tsd-kind-type-alias">MessageHandler</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PoolOptions.html#Worker">Worker</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="PoolOptions.html#onlineHandler">onlineHandler</a><span class="tsd-signature-symbol">?: </span><a href="../types/OnlineHandler.html" class="tsd-signature-type tsd-kind-type-alias">OnlineHandler</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PoolOptions.html#Worker">Worker</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="PoolOptions.html#restartWorkerOnError">restartWorkerOnError</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="PoolOptions.html#settings">settings</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ClusterSettings</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="PoolOptions.html#startWorkers">startWorkers</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="PoolOptions.html#tasksQueueOptions">tasksQueueOptions</a><span class="tsd-signature-symbol">?: </span><a href="TasksQueueOptions.html" class="tsd-signature-type tsd-kind-interface">TasksQueueOptions</a><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="PoolOptions.html#workerChoiceStrategy">workerChoiceStrategy</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">"ROUND_ROBIN"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"LEAST_USED"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"LEAST_BUSY"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"LEAST_ELU"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"FAIR_SHARE"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"WEIGHTED_ROUND_ROBIN"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"INTERLEAVED_WEIGHTED_ROUND_ROBIN"</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="PoolOptions.html#workerChoiceStrategyOptions">workerChoiceStrategyOptions</a><span class="tsd-signature-symbol">?: </span><a href="WorkerChoiceStrategyOptions.html" class="tsd-signature-type tsd-kind-interface">WorkerChoiceStrategyOptions</a><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="PoolOptions.html#workerOptions">workerOptions</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">WorkerOptions</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div> <section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="Worker" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Worker</span><span class="tsd-signature-keyword"> extends </span><a href="IWorker.html" class="tsd-signature-type tsd-kind-interface">IWorker</a></span><div class="tsd-comment tsd-typography"><p>Type of worker.</p> |
6c2aa71d | 3 | </div><div class="tsd-comment tsd-typography"></div></li></ul></section> <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L177">src/pools/pool.ts:177</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="PoolOptions.html#enableEvents" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>enable<wbr/>Events?</span></a> |
86de0a2d DB |
4 | <a href="PoolOptions.html#enableTasksQueue" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>enable<wbr/>Tasks<wbr/>Queue?</span></a> |
5 | <a href="PoolOptions.html#env" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>env?</span></a> | |
6 | <a href="PoolOptions.html#errorHandler" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>error<wbr/>Handler?</span></a> | |
7 | <a href="PoolOptions.html#exitHandler" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exit<wbr/>Handler?</span></a> | |
8 | <a href="PoolOptions.html#messageHandler" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>message<wbr/>Handler?</span></a> | |
9 | <a href="PoolOptions.html#onlineHandler" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>online<wbr/>Handler?</span></a> | |
10 | <a href="PoolOptions.html#restartWorkerOnError" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>restart<wbr/>Worker<wbr/>On<wbr/>Error?</span></a> | |
11 | <a href="PoolOptions.html#settings" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>settings?</span></a> | |
12 | <a href="PoolOptions.html#startWorkers" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>start<wbr/>Workers?</span></a> | |
13 | <a href="PoolOptions.html#tasksQueueOptions" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>tasks<wbr/>Queue<wbr/>Options?</span></a> | |
14 | <a href="PoolOptions.html#workerChoiceStrategy" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Choice<wbr/>Strategy?</span></a> | |
15 | <a href="PoolOptions.html#workerChoiceStrategyOptions" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Choice<wbr/>Strategy<wbr/>Options?</span></a> | |
16 | <a href="PoolOptions.html#workerOptions" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Options?</span></a> | |
17 | </div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Properties</h2><section class="tsd-panel tsd-member"><a id="enableEvents" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>enable<wbr/>Events</span><a href="#enableEvents" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">enable<wbr/>Events</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Pool events integrated with async resource emission.</p> | |
f9fc489a | 18 | </div><div class="tsd-comment tsd-typography"><h4>Default Value</h4><pre><code class="language-ts"><span class="hl-4">true</span> |
323daa7f | 19 | </code><button>Copy</button></pre> |
6c2aa71d | 20 | </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L227">src/pools/pool.ts:227</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="enableTasksQueue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>enable<wbr/>Tasks<wbr/>Queue</span><a href="#enableTasksQueue" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">enable<wbr/>Tasks<wbr/>Queue</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Pool worker node tasks queue.</p> |
f9fc489a | 21 | </div><div class="tsd-comment tsd-typography"><h4>Default Value</h4><pre><code class="language-ts"><span class="hl-4">false</span> |
323daa7f | 22 | </code><button>Copy</button></pre> |
6c2aa71d | 23 | </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L233">src/pools/pool.ts:233</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="env" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>env</span><a href="#env" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">env</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Key/value pairs to add to worker process environment.</p> |
7dc38417 | 24 | </div><div class="tsd-comment tsd-typography"><h4>See</h4><p><a href="https://nodejs.org/api/cluster.html#cluster_cluster_fork_env">https://nodejs.org/api/cluster.html#cluster_cluster_fork_env</a></p> |
6c2aa71d | 25 | </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L249">src/pools/pool.ts:249</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="errorHandler" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>error<wbr/>Handler</span><a href="#errorHandler" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">error<wbr/>Handler</span><span class="tsd-signature-symbol">?:</span> <a href="../types/ErrorHandler.html" class="tsd-signature-type tsd-kind-type-alias">ErrorHandler</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PoolOptions.html#Worker">Worker</a><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>A function that will listen for error event on each worker.</p> |
f9fc489a | 26 | </div><div class="tsd-comment tsd-typography"><h4>Default Value</h4><p><code>() => {}</code></p> |
6c2aa71d | 27 | </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L195">src/pools/pool.ts:195</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="exitHandler" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>exit<wbr/>Handler</span><a href="#exitHandler" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exit<wbr/>Handler</span><span class="tsd-signature-symbol">?:</span> <a href="../types/ExitHandler.html" class="tsd-signature-type tsd-kind-type-alias">ExitHandler</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PoolOptions.html#Worker">Worker</a><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>A function that will listen for exit event on each worker.</p> |
f9fc489a | 28 | </div><div class="tsd-comment tsd-typography"><h4>Default Value</h4><p><code>() => {}</code></p> |
6c2aa71d | 29 | </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L201">src/pools/pool.ts:201</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="messageHandler" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>message<wbr/>Handler</span><a href="#messageHandler" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">message<wbr/>Handler</span><span class="tsd-signature-symbol">?:</span> <a href="../types/MessageHandler.html" class="tsd-signature-type tsd-kind-type-alias">MessageHandler</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PoolOptions.html#Worker">Worker</a><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>A function that will listen for message event on each worker.</p> |
f9fc489a | 30 | </div><div class="tsd-comment tsd-typography"><h4>Default Value</h4><p><code>() => {}</code></p> |
6c2aa71d | 31 | </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L189">src/pools/pool.ts:189</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="onlineHandler" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>online<wbr/>Handler</span><a href="#onlineHandler" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">online<wbr/>Handler</span><span class="tsd-signature-symbol">?:</span> <a href="../types/OnlineHandler.html" class="tsd-signature-type tsd-kind-type-alias">OnlineHandler</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PoolOptions.html#Worker">Worker</a><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>A function that will listen for online event on each worker.</p> |
f9fc489a | 32 | </div><div class="tsd-comment tsd-typography"><h4>Default Value</h4><p><code>() => {}</code></p> |
6c2aa71d DB |
33 | </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L183">src/pools/pool.ts:183</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="restartWorkerOnError" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>restart<wbr/>Worker<wbr/>On<wbr/>Error</span><a href="#restartWorkerOnError" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">restart<wbr/>Worker<wbr/>On<wbr/>Error</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Restart worker on error.</p> |
34 | </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L221">src/pools/pool.ts:221</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="settings" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>settings</span><a href="#settings" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">ClusterSettings</span></div><div class="tsd-comment tsd-typography"><p>Cluster settings.</p> | |
7dc38417 | 35 | </div><div class="tsd-comment tsd-typography"><h4>See</h4><p><a href="https://nodejs.org/api/cluster.html#cluster_cluster_settings">https://nodejs.org/api/cluster.html#cluster_cluster_settings</a></p> |
6c2aa71d | 36 | </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L255">src/pools/pool.ts:255</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="startWorkers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>start<wbr/>Workers</span><a href="#startWorkers" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">start<wbr/>Workers</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Whether to start the minimum number of workers at pool initialization.</p> |
f9fc489a | 37 | </div><div class="tsd-comment tsd-typography"><h4>Default Value</h4><pre><code class="language-ts"><span class="hl-4">true</span> |
0b4e655c | 38 | </code><button>Copy</button></pre> |
6c2aa71d DB |
39 | </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L207">src/pools/pool.ts:207</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="tasksQueueOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>tasks<wbr/>Queue<wbr/>Options</span><a href="#tasksQueueOptions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">tasks<wbr/>Queue<wbr/>Options</span><span class="tsd-signature-symbol">?:</span> <a href="TasksQueueOptions.html" class="tsd-signature-type tsd-kind-interface">TasksQueueOptions</a></div><div class="tsd-comment tsd-typography"><p>Pool worker node tasks queue options.</p> |
40 | </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L237">src/pools/pool.ts:237</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="workerChoiceStrategy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>worker<wbr/>Choice<wbr/>Strategy</span><a href="#workerChoiceStrategy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">worker<wbr/>Choice<wbr/>Strategy</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">"ROUND_ROBIN"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"LEAST_USED"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"LEAST_BUSY"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"LEAST_ELU"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"FAIR_SHARE"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"WEIGHTED_ROUND_ROBIN"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"INTERLEAVED_WEIGHTED_ROUND_ROBIN"</span></div><div class="tsd-comment tsd-typography"><p>The default worker choice strategy to use in this pool.</p> | |
2493c343 | 41 | </div><div class="tsd-comment tsd-typography"><h4>Default Value</h4><pre><code class="language-ts"><span class="hl-0">WorkerChoiceStrategies</span><span class="hl-1">.</span><span class="hl-3">ROUND_ROBIN</span> |
323daa7f | 42 | </code><button>Copy</button></pre> |
6c2aa71d DB |
43 | </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L213">src/pools/pool.ts:213</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="workerChoiceStrategyOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span><a href="#workerChoiceStrategyOptions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span><span class="tsd-signature-symbol">?:</span> <a href="WorkerChoiceStrategyOptions.html" class="tsd-signature-type tsd-kind-interface">WorkerChoiceStrategyOptions</a></div><div class="tsd-comment tsd-typography"><p>The worker choice strategy options.</p> |
44 | </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L217">src/pools/pool.ts:217</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="workerOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>worker<wbr/>Options</span><a href="#workerOptions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">worker<wbr/>Options</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">WorkerOptions</span></div><div class="tsd-comment tsd-typography"><p>Worker options.</p> | |
7dc38417 | 45 | </div><div class="tsd-comment tsd-typography"><h4>See</h4><p><a href="https://nodejs.org/api/worker_threads.html#new-workerfilename-options">https://nodejs.org/api/worker_threads.html#new-workerfilename-options</a></p> |
6c2aa71d | 46 | </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/8e41ea40b8d3c58dd5f87476e5d587094aef3749/src/pools/pool.ts#L243">src/pools/pool.ts:243</a></li></ul></aside></section></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#enableEvents" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>enable<wbr/>Events</span></a><a href="#enableTasksQueue" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>enable<wbr/>Tasks<wbr/>Queue</span></a><a href="#env" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>env</span></a><a href="#errorHandler" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>error<wbr/>Handler</span></a><a href="#exitHandler" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exit<wbr/>Handler</span></a><a href="#messageHandler" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>message<wbr/>Handler</span></a><a href="#onlineHandler" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>online<wbr/>Handler</span></a><a href="#restartWorkerOnError" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>restart<wbr/>Worker<wbr/>On<wbr/>Error</span></a><a href="#settings" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>settings</span></a><a href="#startWorkers" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>start<wbr/>Workers</span></a><a href="#tasksQueueOptions" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>tasks<wbr/>Queue<wbr/>Options</span></a><a href="#workerChoiceStrategy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Choice<wbr/>Strategy</span></a><a href="#workerChoiceStrategyOptions" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span></a><a href="#workerOptions" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Options</span></a></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>poolifier - v4.0.12</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html> |