Commit | Line | Data |
---|---|---|
7da80359 | 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.4.4</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.4.4</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> |
200c455f | 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><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"FAIR_SHARE"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"INTERLEAVED_WEIGHTED_ROUND_ROBIN"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"LEAST_BUSY"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"LEAST_ELU"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"LEAST_USED"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"ROUND_ROBIN"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"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> |
7da80359 | 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/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L186">src/pools/pool.ts:186</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-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> | |
224d0081 | 17 | </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="enableEvents" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">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> |
7bd639b9 | 18 | </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Default Value"><h4 class="tsd-anchor-link"><a id="Default Value" class="tsd-anchor"></a>Default Value<a href="#Default Value" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">true</span> |
224d0081 DB |
19 | </code><button type="button">Copy</button></pre> |
20 | ||
7da80359 | 21 | </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L191">src/pools/pool.ts:191</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">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> |
7bd639b9 | 22 | </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Default Value"><h4 class="tsd-anchor-link"><a id="Default Value-1" class="tsd-anchor"></a>Default Value<a href="#Default Value-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">false</span> |
224d0081 DB |
23 | </code><button type="button">Copy</button></pre> |
24 | ||
7da80359 | 25 | </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L196">src/pools/pool.ts:196</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">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> |
7bd639b9 | 26 | </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-See"><h4 class="tsd-anchor-link"><a id="See" class="tsd-anchor"></a>See<a href="#See" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="https://nodejs.org/api/cluster.html#cluster_cluster_fork_env" target="_blank" class="external">https://nodejs.org/api/cluster.html#cluster_cluster_fork_env</a></p> |
7da80359 | 27 | </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L201">src/pools/pool.ts:201</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">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> |
7bd639b9 | 28 | </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Default Value"><h4 class="tsd-anchor-link"><a id="Default Value-2" class="tsd-anchor"></a>Default Value<a href="#Default Value-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><code>() => {}</code></p> |
7da80359 | 29 | </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L206">src/pools/pool.ts:206</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">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> |
7bd639b9 | 30 | </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Default Value"><h4 class="tsd-anchor-link"><a id="Default Value-3" class="tsd-anchor"></a>Default Value<a href="#Default Value-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><code>() => {}</code></p> |
7da80359 | 31 | </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L211">src/pools/pool.ts:211</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">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> |
7bd639b9 | 32 | </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Default Value"><h4 class="tsd-anchor-link"><a id="Default Value-4" class="tsd-anchor"></a>Default Value<a href="#Default Value-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><code>() => {}</code></p> |
7da80359 | 33 | </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L216">src/pools/pool.ts:216</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">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> |
7bd639b9 | 34 | </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Default Value"><h4 class="tsd-anchor-link"><a id="Default Value-5" class="tsd-anchor"></a>Default Value<a href="#Default Value-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><code>() => {}</code></p> |
7da80359 DB |
35 | </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L221">src/pools/pool.ts:221</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">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> |
36 | </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L225">src/pools/pool.ts:225</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">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> | |
7bd639b9 | 37 | </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-See"><h4 class="tsd-anchor-link"><a id="See-1" class="tsd-anchor"></a>See<a href="#See-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="https://nodejs.org/api/cluster.html#cluster_cluster_settings" target="_blank" class="external">https://nodejs.org/api/cluster.html#cluster_cluster_settings</a></p> |
7da80359 | 38 | </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L230">src/pools/pool.ts:230</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">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> |
7bd639b9 | 39 | </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Default Value"><h4 class="tsd-anchor-link"><a id="Default Value-6" class="tsd-anchor"></a>Default Value<a href="#Default Value-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">true</span> |
224d0081 DB |
40 | </code><button type="button">Copy</button></pre> |
41 | ||
7da80359 DB |
42 | </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L235">src/pools/pool.ts:235</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">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> |
43 | </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L239">src/pools/pool.ts:239</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">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> <br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"FAIR_SHARE"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"INTERLEAVED_WEIGHTED_ROUND_ROBIN"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"LEAST_BUSY"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"LEAST_ELU"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"LEAST_USED"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"ROUND_ROBIN"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"WEIGHTED_ROUND_ROBIN"</span></div><div class="tsd-comment tsd-typography"><p>The default worker choice strategy to use in this pool.</p> | |
7bd639b9 | 44 | </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Default Value"><h4 class="tsd-anchor-link"><a id="Default Value-7" class="tsd-anchor"></a>Default Value<a href="#Default Value-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">WorkerChoiceStrategies</span><span class="hl-2">.</span><span class="hl-3">ROUND_ROBIN</span> |
224d0081 DB |
45 | </code><button type="button">Copy</button></pre> |
46 | ||
7da80359 DB |
47 | </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L244">src/pools/pool.ts:244</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">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> |
48 | </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L248">src/pools/pool.ts:248</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">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> | |
7bd639b9 | 49 | </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-See"><h4 class="tsd-anchor-link"><a id="See-2" class="tsd-anchor"></a>See<a href="#See-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="https://nodejs.org/api/worker_threads.html#new-workerfilename-options" target="_blank" class="external">https://nodejs.org/api/worker_threads.html#new-workerfilename-options</a></p> |
7da80359 | 50 | </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/pool.ts#L253">src/pools/pool.ts:253</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-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"><span class="settings-label">Member Visibility</span><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-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></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><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-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"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><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></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.4.4</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> |