2 <html class=
"default no-js">
5 <meta http-equiv=
"X-UA-Compatible" content=
"IE=edge">
6 <title>ClusterPoolOptions | poolifier
</title>
7 <meta name=
"description" content=
"Documentation for poolifier">
8 <meta name=
"viewport" content=
"width=device-width, initial-scale=1">
9 <link rel=
"stylesheet" href=
"../assets/css/main.css">
10 <script async
src=
"../assets/js/search.js" id=
"search-script"></script>
14 <div class=
"tsd-page-toolbar">
15 <div class=
"container">
16 <div class=
"table-wrap">
17 <div class=
"table-cell" id=
"tsd-search" data-index=
"../assets/js/search.json" data-base=
"..">
19 <label for=
"tsd-search-field" class=
"tsd-widget search no-caption">Search
</label>
20 <input id=
"tsd-search-field" type=
"text" />
23 <li class=
"state loading">Preparing search index...
</li>
24 <li class=
"state failure">The search index is not available
</li>
26 <a href=
"../index.html" class=
"title">poolifier
</a>
28 <div class=
"table-cell" id=
"tsd-widgets">
30 <a href=
"#" class=
"tsd-widget options no-caption" data-toggle=
"options">Options
</a>
31 <div class=
"tsd-filter-group">
32 <div class=
"tsd-select" id=
"tsd-filter-visibility">
33 <span class=
"tsd-select-label">All
</span>
34 <ul class=
"tsd-select-list">
35 <li data-value=
"public">Public
</li>
36 <li data-value=
"protected">Public/Protected
</li>
37 <li data-value=
"private" class=
"selected">All
</li>
40 <input type=
"checkbox" id=
"tsd-filter-inherited" checked
/>
41 <label class=
"tsd-widget" for=
"tsd-filter-inherited">Inherited
</label>
42 <input type=
"checkbox" id=
"tsd-filter-externals" checked
/>
43 <label class=
"tsd-widget" for=
"tsd-filter-externals">Externals
</label>
46 <a href=
"#" class=
"tsd-widget menu no-caption" data-toggle=
"menu">Menu
</a>
51 <div class=
"tsd-page-title">
52 <div class=
"container">
53 <ul class=
"tsd-breadcrumb">
55 <a href=
"../index.html">poolifier
</a>
58 <a href=
"clusterpooloptions.html">ClusterPoolOptions
</a>
61 <h1>Interface ClusterPoolOptions
</h1>
65 <div class=
"container container-main">
67 <div class=
"col-8 col-content">
68 <section class=
"tsd-panel tsd-comment">
69 <div class=
"tsd-comment tsd-typography">
71 <p>Options for a poolifier cluster pool.
</p>
75 <section class=
"tsd-panel tsd-hierarchy">
77 <ul class=
"tsd-hierarchy">
79 <a href=
"pooloptions.html" class=
"tsd-signature-type" data-tsd-kind=
"Interface">PoolOptions
</a><span class=
"tsd-signature-symbol"><</span><span class=
"tsd-signature-type">Worker
</span><span class=
"tsd-signature-symbol">></span>
80 <ul class=
"tsd-hierarchy">
82 <span class=
"target">ClusterPoolOptions
</span>
88 <section class=
"tsd-panel-group tsd-index-group">
90 <section class=
"tsd-panel tsd-index-panel">
91 <div class=
"tsd-index-content">
92 <section class=
"tsd-index-section ">
94 <ul class=
"tsd-index-list">
95 <li class=
"tsd-kind-property tsd-parent-kind-interface"><a href=
"clusterpooloptions.html#env" class=
"tsd-kind-icon">env
</a></li>
96 <li class=
"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href=
"clusterpooloptions.html#errorhandler" class=
"tsd-kind-icon">error
<wbr>Handler
</a></li>
97 <li class=
"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href=
"clusterpooloptions.html#exithandler" class=
"tsd-kind-icon">exit
<wbr>Handler
</a></li>
98 <li class=
"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href=
"clusterpooloptions.html#onlinehandler" class=
"tsd-kind-icon">online
<wbr>Handler
</a></li>
99 <li class=
"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href=
"clusterpooloptions.html#workerchoicestrategy" class=
"tsd-kind-icon">worker
<wbr>Choice
<wbr>Strategy
</a></li>
105 <section class=
"tsd-panel-group tsd-member-group ">
107 <section class=
"tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
108 <a name=
"env" class=
"tsd-anchor"></a>
109 <h3><span class=
"tsd-flag ts-flagOptional">Optional
</span> env
</h3>
110 <div class=
"tsd-signature tsd-kind-icon">env
<span class=
"tsd-signature-symbol">:
</span> <span class=
"tsd-signature-type">any
</span></div>
111 <aside class=
"tsd-sources">
113 <li>Defined in
<a href=
"https://github.com/jerome-benoit/poolifier/blob/5d4101b/src/pools/cluster/fixed.ts#L16">src/pools/cluster/fixed.ts:
16</a></li>
116 <div class=
"tsd-comment tsd-typography">
118 <p>Key/value pairs to add to worker process environment.
</p>
120 <dl class=
"tsd-comment-tags">
122 <dd><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>
127 <section class=
"tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited">
128 <a name=
"errorhandler" class=
"tsd-anchor"></a>
129 <h3><span class=
"tsd-flag ts-flagOptional">Optional
</span> error
<wbr>Handler
</h3>
130 <div class=
"tsd-signature tsd-kind-icon">error
<wbr>Handler
<span class=
"tsd-signature-symbol">:
</span> <span class=
"tsd-signature-type">undefined
</span><span class=
"tsd-signature-symbol"> |
</span><a href=
"../index.html#errorhandler" class=
"tsd-signature-type" data-tsd-kind=
"Type alias">ErrorHandler
</a><span class=
"tsd-signature-symbol"><</span><span class=
"tsd-signature-type">Worker
</span><span class=
"tsd-signature-symbol">></span></div>
131 <aside class=
"tsd-sources">
132 <p>Inherited from
<a href=
"pooloptions.html">PoolOptions
</a>.
<a href=
"pooloptions.html#errorhandler">errorHandler
</a></p>
134 <li>Defined in
<a href=
"https://github.com/jerome-benoit/poolifier/blob/5d4101b/src/pools/abstract-pool.ts#L77">src/pools/abstract-pool.ts:
77</a></li>
137 <div class=
"tsd-comment tsd-typography">
139 <p>A function that will listen for error event on each worker.
</p>
143 <section class=
"tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited">
144 <a name=
"exithandler" class=
"tsd-anchor"></a>
145 <h3><span class=
"tsd-flag ts-flagOptional">Optional
</span> exit
<wbr>Handler
</h3>
146 <div class=
"tsd-signature tsd-kind-icon">exit
<wbr>Handler
<span class=
"tsd-signature-symbol">:
</span> <span class=
"tsd-signature-type">undefined
</span><span class=
"tsd-signature-symbol"> |
</span><a href=
"../index.html#exithandler" class=
"tsd-signature-type" data-tsd-kind=
"Type alias">ExitHandler
</a><span class=
"tsd-signature-symbol"><</span><span class=
"tsd-signature-type">Worker
</span><span class=
"tsd-signature-symbol">></span></div>
147 <aside class=
"tsd-sources">
148 <p>Inherited from
<a href=
"pooloptions.html">PoolOptions
</a>.
<a href=
"pooloptions.html#exithandler">exitHandler
</a></p>
150 <li>Defined in
<a href=
"https://github.com/jerome-benoit/poolifier/blob/5d4101b/src/pools/abstract-pool.ts#L85">src/pools/abstract-pool.ts:
85</a></li>
153 <div class=
"tsd-comment tsd-typography">
155 <p>A function that will listen for exit event on each worker.
</p>
159 <section class=
"tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited">
160 <a name=
"onlinehandler" class=
"tsd-anchor"></a>
161 <h3><span class=
"tsd-flag ts-flagOptional">Optional
</span> online
<wbr>Handler
</h3>
162 <div class=
"tsd-signature tsd-kind-icon">online
<wbr>Handler
<span class=
"tsd-signature-symbol">:
</span> <span class=
"tsd-signature-type">undefined
</span><span class=
"tsd-signature-symbol"> |
</span><a href=
"../index.html#onlinehandler" class=
"tsd-signature-type" data-tsd-kind=
"Type alias">OnlineHandler
</a><span class=
"tsd-signature-symbol"><</span><span class=
"tsd-signature-type">Worker
</span><span class=
"tsd-signature-symbol">></span></div>
163 <aside class=
"tsd-sources">
164 <p>Inherited from
<a href=
"pooloptions.html">PoolOptions
</a>.
<a href=
"pooloptions.html#onlinehandler">onlineHandler
</a></p>
166 <li>Defined in
<a href=
"https://github.com/jerome-benoit/poolifier/blob/5d4101b/src/pools/abstract-pool.ts#L81">src/pools/abstract-pool.ts:
81</a></li>
169 <div class=
"tsd-comment tsd-typography">
171 <p>A function that will listen for online event on each worker.
</p>
175 <section class=
"tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited">
176 <a name=
"workerchoicestrategy" class=
"tsd-anchor"></a>
177 <h3><span class=
"tsd-flag ts-flagOptional">Optional
</span> worker
<wbr>Choice
<wbr>Strategy
</h3>
178 <div class=
"tsd-signature tsd-kind-icon">worker
<wbr>Choice
<wbr>Strategy
<span class=
"tsd-signature-symbol">:
</span> <span class=
"tsd-signature-type">undefined
</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">"LESS_RECENTLY_USED
"</span></div>
179 <aside class=
"tsd-sources">
180 <p>Inherited from
<a href=
"pooloptions.html">PoolOptions
</a>.
<a href=
"pooloptions.html#workerchoicestrategy">workerChoiceStrategy
</a></p>
182 <li>Defined in
<a href=
"https://github.com/jerome-benoit/poolifier/blob/5d4101b/src/pools/abstract-pool.ts#L89">src/pools/abstract-pool.ts:
89</a></li>
185 <div class=
"tsd-comment tsd-typography">
187 <p>The work choice strategy to use in this pool.
</p>
193 <div class=
"col-4 col-menu menu-sticky-wrap menu-highlight">
194 <nav class=
"tsd-navigation primary">
197 <a href=
"../index.html">Exports
</a>
201 <nav class=
"tsd-navigation secondary menu-sticky">
202 <ul class=
"before-current">
203 <li class=
" tsd-kind-class tsd-has-type-parameter">
204 <a href=
"../classes/abstractworker.html" class=
"tsd-kind-icon">Abstract
<wbr>Worker
</a>
206 <li class=
" tsd-kind-class tsd-has-type-parameter">
207 <a href=
"../classes/clusterworker.html" class=
"tsd-kind-icon">Cluster
<wbr>Worker
</a>
209 <li class=
" tsd-kind-class tsd-has-type-parameter">
210 <a href=
"../classes/dynamicclusterpool.html" class=
"tsd-kind-icon">Dynamic
<wbr>Cluster
<wbr>Pool
</a>
212 <li class=
" tsd-kind-class tsd-has-type-parameter">
213 <a href=
"../classes/dynamicthreadpool.html" class=
"tsd-kind-icon">Dynamic
<wbr>Thread
<wbr>Pool
</a>
215 <li class=
" tsd-kind-class tsd-has-type-parameter">
216 <a href=
"../classes/fixedclusterpool.html" class=
"tsd-kind-icon">Fixed
<wbr>Cluster
<wbr>Pool
</a>
218 <li class=
" tsd-kind-class tsd-has-type-parameter">
219 <a href=
"../classes/fixedthreadpool.html" class=
"tsd-kind-icon">Fixed
<wbr>Thread
<wbr>Pool
</a>
221 <li class=
" tsd-kind-class tsd-has-type-parameter">
222 <a href=
"../classes/threadworker.html" class=
"tsd-kind-icon">Thread
<wbr>Worker
</a>
226 <li class=
"current tsd-kind-interface">
227 <a href=
"clusterpooloptions.html" class=
"tsd-kind-icon">Cluster
<wbr>Pool
<wbr>Options
</a>
229 <li class=
" tsd-kind-property tsd-parent-kind-interface">
230 <a href=
"clusterpooloptions.html#env" class=
"tsd-kind-icon">env
</a>
232 <li class=
" tsd-kind-property tsd-parent-kind-interface tsd-is-inherited">
233 <a href=
"clusterpooloptions.html#errorhandler" class=
"tsd-kind-icon">error
<wbr>Handler
</a>
235 <li class=
" tsd-kind-property tsd-parent-kind-interface tsd-is-inherited">
236 <a href=
"clusterpooloptions.html#exithandler" class=
"tsd-kind-icon">exit
<wbr>Handler
</a>
238 <li class=
" tsd-kind-property tsd-parent-kind-interface tsd-is-inherited">
239 <a href=
"clusterpooloptions.html#onlinehandler" class=
"tsd-kind-icon">online
<wbr>Handler
</a>
241 <li class=
" tsd-kind-property tsd-parent-kind-interface tsd-is-inherited">
242 <a href=
"clusterpooloptions.html#workerchoicestrategy" class=
"tsd-kind-icon">worker
<wbr>Choice
<wbr>Strategy
</a>
247 <ul class=
"after-current">
248 <li class=
" tsd-kind-interface tsd-has-type-parameter">
249 <a href=
"ipool.html" class=
"tsd-kind-icon">IPool
</a>
251 <li class=
" tsd-kind-interface">
252 <a href=
"iworker.html" class=
"tsd-kind-icon">IWorker
</a>
254 <li class=
" tsd-kind-interface tsd-has-type-parameter">
255 <a href=
"pooloptions.html" class=
"tsd-kind-icon">Pool
<wbr>Options
</a>
257 <li class=
" tsd-kind-interface">
258 <a href=
"workeroptions.html" class=
"tsd-kind-icon">Worker
<wbr>Options
</a>
260 <li class=
" tsd-kind-type-alias tsd-has-type-parameter">
261 <a href=
"../index.html#errorhandler" class=
"tsd-kind-icon">Error
<wbr>Handler
</a>
263 <li class=
" tsd-kind-type-alias tsd-has-type-parameter">
264 <a href=
"../index.html#exithandler" class=
"tsd-kind-icon">Exit
<wbr>Handler
</a>
266 <li class=
" tsd-kind-type-alias">
267 <a href=
"../index.html#killbehavior" class=
"tsd-kind-icon">Kill
<wbr>Behavior
</a>
269 <li class=
" tsd-kind-type-alias tsd-has-type-parameter">
270 <a href=
"../index.html#onlinehandler" class=
"tsd-kind-icon">Online
<wbr>Handler
</a>
272 <li class=
" tsd-kind-type-alias">
273 <a href=
"../index.html#threadworkerwithmessagechannel" class=
"tsd-kind-icon">Thread
<wbr>Worker
<wbr>With
<wbr>Message
<wbr>Channel
</a>
275 <li class=
" tsd-kind-type-alias">
276 <a href=
"../index.html#workerchoicestrategy" class=
"tsd-kind-icon">Worker
<wbr>Choice
<wbr>Strategy
</a>
278 <li class=
" tsd-kind-variable">
279 <a href=
"../index.html#killbehaviors" class=
"tsd-kind-icon">Kill
<wbr>Behaviors
</a>
281 <li class=
" tsd-kind-variable">
282 <a href=
"../index.html#workerchoicestrategies" class=
"tsd-kind-icon">Worker
<wbr>Choice
<wbr>Strategies
</a>
289 <footer class=
"with-border-bottom">
290 <div class=
"container">
292 <div class=
"tsd-legend-group">
293 <ul class=
"tsd-legend">
294 <li class=
"tsd-kind-property tsd-parent-kind-interface"><span class=
"tsd-kind-icon">Property
</span></li>
295 <li class=
"tsd-kind-method tsd-parent-kind-interface"><span class=
"tsd-kind-icon">Method
</span></li>
297 <ul class=
"tsd-legend">
298 <li class=
"tsd-kind-property tsd-parent-kind-class"><span class=
"tsd-kind-icon">Property
</span></li>
299 <li class=
"tsd-kind-method tsd-parent-kind-class"><span class=
"tsd-kind-icon">Method
</span></li>
301 <ul class=
"tsd-legend">
302 <li class=
"tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class=
"tsd-kind-icon">Inherited property
</span></li>
303 <li class=
"tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class=
"tsd-kind-icon">Inherited method
</span></li>
305 <ul class=
"tsd-legend">
306 <li class=
"tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class=
"tsd-kind-icon">Protected property
</span></li>
307 <li class=
"tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class=
"tsd-kind-icon">Protected method
</span></li>
309 <ul class=
"tsd-legend">
310 <li class=
"tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class=
"tsd-kind-icon">Private method
</span></li>
315 <div class=
"container tsd-generator">
316 <p>Generated using
<a href=
"https://typedoc.org/" target=
"_blank">TypeDoc
</a></p>
318 <div class=
"overlay"></div>
319 <script src=
"../assets/js/main.js"></script>