From d6a303b54835c032811b6cbb62deb368beb81182 Mon Sep 17 00:00:00 2001 From: Deivu Date: Wed, 17 Apr 2024 11:36:42 +0800 Subject: [PATCH] chore: simplify identify handling --- .eslintrc.json | 1 - docs/CNAME | 1 - docs/assets/icons.js | 15 + docs/assets/icons.svg | 1 + docs/assets/main.js | 7 +- docs/assets/navigation.js | 1 + docs/assets/search.js | 2 +- docs/assets/style.css | 109 +- docs/classes/Indomitable.Indomitable.html | 1972 ++--------------- .../client_ShardClient.ShardClient.html | 157 +- ...lient_ShardClientUtil.ShardClientUtil.html | 1043 ++------- ...y_ConcurrencyClient.ConcurrencyClient.html | 145 +- ...ConcurrencyManager.ConcurrencyManager.html | 155 +- docs/classes/ipc_BaseIpc.BaseIpc.html | 239 +- docs/classes/ipc_BaseWorker.BaseWorker.html | 19 + .../ipc_ClientWorker.ClientWorker.html | 20 + docs/classes/ipc_Main.Main.html | 232 -- docs/classes/ipc_MainWorker.MainWorker.html | 20 + docs/classes/ipc_Worker.Worker.html | 234 -- ...manager_ClusterManager.ClusterManager.html | 273 +-- docs/enums/Util.ClientEvents.html | 189 +- docs/enums/Util.InternalOps.html | 10 + docs/enums/Util.LibraryEvents.html | 181 +- docs/enums/Util.MainStrategyOps.html | 7 + docs/enums/Util.RawIpcMessageType.html | 109 +- docs/enums/Util.ThreadStrategyOps.html | 7 + docs/functions/Util.Chunk.html | 99 +- docs/functions/Util.Delay.html | 93 +- docs/functions/Util.Fetch.html | 99 +- docs/functions/Util.FetchSessions.html | 93 +- docs/functions/Util.MakeAbortableRequest.html | 93 +- docs/hierarchy.html | 1 + docs/index.html | 102 +- .../Indomitable.IndomitableOptions.html | 178 +- .../Indomitable.ReconfigureOptions.html | 93 +- .../Indomitable.ShardEventData.html | 109 +- docs/interfaces/Util.AbortableData.html | 108 +- docs/interfaces/Util.ClientEventData.html | 5 + docs/interfaces/Util.InternalAbortSignal.html | 116 +- docs/interfaces/Util.InternalError.html | 129 -- docs/interfaces/Util.InternalEvents.html | 115 - docs/interfaces/Util.InternalOpsData.html | 5 + docs/interfaces/Util.InternalPromise.html | 120 +- docs/interfaces/Util.IpcErrorData.html | 5 + docs/interfaces/Util.MainStrategyData.html | 5 + docs/interfaces/Util.Message.html | 133 +- docs/interfaces/Util.RawIpcMessage.html | 128 +- docs/interfaces/Util.SavePromiseOptions.html | 149 +- docs/interfaces/Util.SessionObject.html | 131 +- docs/interfaces/Util.ThreadStrategyData.html | 7 + docs/interfaces/Util.Transportable.html | 120 +- ...ent_ShardClient.PartialInternalEvents.html | 104 +- ..._ClusterManager.ClusterManagerOptions.html | 104 +- docs/modules/Indomitable.html | 75 +- docs/modules/Util.html | 127 +- docs/modules/client_ShardClient.html | 69 +- docs/modules/client_ShardClientUtil.html | 63 +- .../concurrency_ConcurrencyClient.html | 63 +- .../concurrency_ConcurrencyManager.html | 63 +- docs/modules/ipc_BaseIpc.html | 63 +- docs/modules/ipc_BaseWorker.html | 2 + docs/modules/ipc_ClientWorker.html | 2 + docs/modules/ipc_Main.html | 61 - docs/modules/ipc_MainWorker.html | 2 + docs/modules/ipc_Worker.html | 61 - docs/modules/manager_ClusterManager.html | 69 +- docs/variables/Util.EnvProcessData.html | 2 + index.ts | 4 - package.json | 22 +- src/client/ShardClient.ts | 8 +- src/concurrency/ConcurrencyClient.ts | 44 + src/ipc/MainStrategyWorker.ts | 62 - src/ipc/ThreadStrategyWorker.ts | 56 - src/strategy/IndomitableFetchingStrategy.ts | 64 - src/strategy/IndomitableStrategy.ts | 131 -- src/strategy/Thread.ts | 34 - 76 files changed, 829 insertions(+), 7911 deletions(-) delete mode 100644 docs/CNAME create mode 100644 docs/assets/icons.js create mode 100644 docs/assets/icons.svg create mode 100644 docs/assets/navigation.js create mode 100644 docs/classes/ipc_BaseWorker.BaseWorker.html create mode 100644 docs/classes/ipc_ClientWorker.ClientWorker.html delete mode 100644 docs/classes/ipc_Main.Main.html create mode 100644 docs/classes/ipc_MainWorker.MainWorker.html delete mode 100644 docs/classes/ipc_Worker.Worker.html create mode 100644 docs/enums/Util.InternalOps.html create mode 100644 docs/enums/Util.MainStrategyOps.html create mode 100644 docs/enums/Util.ThreadStrategyOps.html create mode 100644 docs/hierarchy.html create mode 100644 docs/interfaces/Util.ClientEventData.html delete mode 100644 docs/interfaces/Util.InternalError.html delete mode 100644 docs/interfaces/Util.InternalEvents.html create mode 100644 docs/interfaces/Util.InternalOpsData.html create mode 100644 docs/interfaces/Util.IpcErrorData.html create mode 100644 docs/interfaces/Util.MainStrategyData.html create mode 100644 docs/interfaces/Util.ThreadStrategyData.html create mode 100644 docs/modules/ipc_BaseWorker.html create mode 100644 docs/modules/ipc_ClientWorker.html delete mode 100644 docs/modules/ipc_Main.html create mode 100644 docs/modules/ipc_MainWorker.html delete mode 100644 docs/modules/ipc_Worker.html create mode 100644 docs/variables/Util.EnvProcessData.html create mode 100644 src/concurrency/ConcurrencyClient.ts delete mode 100644 src/ipc/MainStrategyWorker.ts delete mode 100644 src/ipc/ThreadStrategyWorker.ts delete mode 100644 src/strategy/IndomitableFetchingStrategy.ts delete mode 100644 src/strategy/IndomitableStrategy.ts delete mode 100644 src/strategy/Thread.ts diff --git a/.eslintrc.json b/.eslintrc.json index bdbc850..a5141c8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,5 @@ { "parser": "@typescript-eslint/parser", - "extends": "@augu", "rules": { "indent": ["error", 4, { "SwitchCase": 1 }], "quotes": ["error", "single"], diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index 54d2617..0000000 --- a/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -indomitable.shipgirl.moe \ No newline at end of file diff --git a/docs/assets/icons.js b/docs/assets/icons.js new file mode 100644 index 0000000..b79c9e8 --- /dev/null +++ b/docs/assets/icons.js @@ -0,0 +1,15 @@ +(function(svg) { + svg.innerHTML = ``; + svg.style.display = 'none'; + if (location.protocol === 'file:') { + if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', updateUseElements); + else updateUseElements() + function updateUseElements() { + document.querySelectorAll('use').forEach(el => { + if (el.getAttribute('href').includes('#icon-')) { + el.setAttribute('href', el.getAttribute('href').replace(/.*#/, '#')); + } + }); + } + } +})(document.body.appendChild(document.createElementNS('http://www.w3.org/2000/svg', 'svg'))) \ No newline at end of file diff --git a/docs/assets/icons.svg b/docs/assets/icons.svg new file mode 100644 index 0000000..7dead61 --- /dev/null +++ b/docs/assets/icons.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/assets/main.js b/docs/assets/main.js index 4c8fa61..d6f1388 100644 --- a/docs/assets/main.js +++ b/docs/assets/main.js @@ -1,7 +1,8 @@ "use strict"; -"use strict";(()=>{var Se=Object.create;var re=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Te=Object.getOwnPropertyNames;var ke=Object.getPrototypeOf,Qe=Object.prototype.hasOwnProperty;var Pe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ie=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Te(e))!Qe.call(t,i)&&i!==r&&re(t,i,{get:()=>e[i],enumerable:!(n=we(e,i))||n.enumerable});return t};var Ce=(t,e,r)=>(r=t!=null?Se(ke(t)):{},Ie(e||!t||!t.__esModule?re(r,"default",{value:t,enumerable:!0}):r,t));var ae=Pe((se,oe)=>{(function(){var t=function(e){var r=new t.Builder;return r.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),r.searchPipeline.add(t.stemmer),e.call(r,r),r.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(r){e.console&&console.warn&&console.warn(r)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var r=Object.create(null),n=Object.keys(e),i=0;i0){var d=t.utils.clone(r)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(n.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,r){r in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+r),e.label=r,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var r=e.label&&e.label in this.registeredFunctions;r||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. -`,e)},t.Pipeline.load=function(e){var r=new t.Pipeline;return e.forEach(function(n){var i=t.Pipeline.registeredFunctions[n];if(i)r.add(i);else throw new Error("Cannot load unregistered function: "+n)}),r},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(r){t.Pipeline.warnIfFunctionNotRegistered(r),this._stack.push(r)},this)},t.Pipeline.prototype.after=function(e,r){t.Pipeline.warnIfFunctionNotRegistered(r);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");n=n+1,this._stack.splice(n,0,r)},t.Pipeline.prototype.before=function(e,r){t.Pipeline.warnIfFunctionNotRegistered(r);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");this._stack.splice(n,0,r)},t.Pipeline.prototype.remove=function(e){var r=this._stack.indexOf(e);r!=-1&&this._stack.splice(r,1)},t.Pipeline.prototype.run=function(e){for(var r=this._stack.length,n=0;n1&&(oe&&(n=s),o!=e);)i=n-r,s=r+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(r+=n[u+1]*i[d+1],u+=2,d+=2);return r},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),r=1,n=0;r0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),y;m in s.node.edges?y=s.node.edges[m]:(y=new t.TokenSet,s.node.edges[m]=y),s.str.length==1&&(y.final=!0),i.push({node:y,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return n},t.TokenSet.fromString=function(e){for(var r=new t.TokenSet,n=r,i=0,s=e.length;i=e;r--){var n=this.uncheckedNodes[r],i=n.child.toString();i in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[i]:(n.child._str=i,this.minimizedNodes[i]=n.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(r){var n=new t.QueryParser(e,r);n.parse()})},t.Index.prototype.query=function(e){for(var r=new t.Query(this.fields),n=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,r){var n=e[this._ref],i=Object.keys(this._fields);this._documents[n]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,r;do e=this.next(),r=e.charCodeAt(0);while(r>47&&r<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var r=e.next();if(r==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(r.charCodeAt(0)==92){e.escapeCharacter();continue}if(r==":")return t.QueryLexer.lexField;if(r=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(r=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(r=="+"&&e.width()===1||r=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(r.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,r){this.lexer=new t.QueryLexer(e),this.query=r,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var r=e.peekLexeme();if(r!=null)switch(r.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(n+=" with value '"+r.str+"'"),new t.QueryParseError(n,r.start,r.end)}},t.QueryParser.parsePresence=function(e){var r=e.consumeLexeme();if(r!=null){switch(r.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+r.str+"'";throw new t.QueryParseError(n,r.start,r.end)}var i=e.peekLexeme();if(i==null){var n="expecting term or field, found nothing";throw new t.QueryParseError(n,r.start,r.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(n,i.start,i.end)}}},t.QueryParser.parseField=function(e){var r=e.consumeLexeme();if(r!=null){if(e.query.allFields.indexOf(r.str)==-1){var n=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+r.str+"', possible fields: "+n;throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.fields=[r.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,r.start,r.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var r=e.consumeLexeme();if(r!=null){e.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(n==null){e.nextClause();return}switch(n.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new t.QueryParseError(i,n.start,n.end)}}},t.QueryParser.parseEditDistance=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.editDistance=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="boost must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.boost=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,r){typeof define=="function"&&define.amd?define(r):typeof se=="object"?oe.exports=r():e.lunr=r()}(this,function(){return t})})()});var ne=[];function G(t,e){ne.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){ne.forEach(r=>{e.querySelectorAll(r.selector).forEach(n=>{n.dataset.hasInstance||(new r.constructor({el:n,app:this}),n.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),r=e?.parentElement;for(;r&&!r.classList.contains(".tsd-navigation");)r instanceof HTMLDetailsElement&&(r.open=!0),r=r.parentElement;if(e){let n=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=n}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let r=e.parentElement;for(;r&&r.tagName!=="SECTION";)r=r.parentElement;if(r&&r.offsetParent==null){this.alwaysVisibleMember=r,r.classList.add("always-visible");let n=document.createElement("p");n.classList.add("warning"),n.textContent="This member is normally hidden due to your filter settings.",r.prepend(n)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let r;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(r),r=setTimeout(()=>{e.classList.remove("visible"),r=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let r;return()=>{clearTimeout(r),r=setTimeout(()=>t(),e)}};var ce=Ce(ae());function de(){let t=document.getElementById("tsd-search");if(!t)return;let e=document.getElementById("tsd-search-script");t.classList.add("loading"),e&&(e.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),e.addEventListener("load",()=>{t.classList.remove("loading"),t.classList.add("ready")}),window.searchData&&t.classList.remove("loading"));let r=document.querySelector("#tsd-search input"),n=document.querySelector("#tsd-search .results");if(!r||!n)throw new Error("The input field or the result list wrapper was not found");let i=!1;n.addEventListener("mousedown",()=>i=!0),n.addEventListener("mouseup",()=>{i=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{i||(i=!1,t.classList.remove("has-focus"))});let s={base:t.dataset.base+"/"};Oe(t,n,r,s)}function Oe(t,e,r,n){r.addEventListener("input",ie(()=>{Re(t,e,r,n)},200));let i=!1;r.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Fe(e,r):s.key=="Escape"?r.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),r.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!r.matches(":focus")&&s.key==="/"&&(r.focus(),s.preventDefault())})}function _e(t,e){t.index||window.searchData&&(e.classList.remove("loading"),e.classList.add("ready"),t.data=window.searchData,t.index=ce.Index.load(window.searchData.index))}function Re(t,e,r,n){if(_e(n,t),!n.index||!n.data)return;e.textContent="";let i=r.value.trim(),s=i?n.index.search(`*${i}*`):[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o${le(l.parent,i)}.${u}`);let d=document.createElement("li");d.classList.value=l.classes??"";let m=document.createElement("a");m.href=n.base+l.url,m.innerHTML=u,d.append(m),e.appendChild(d)}}function ue(t,e){let r=t.querySelector(".current");if(!r)r=t.querySelector(e==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let n=r;if(e===1)do n=n.nextElementSibling??void 0;while(n instanceof HTMLElement&&n.offsetParent==null);else do n=n.previousElementSibling??void 0;while(n instanceof HTMLElement&&n.offsetParent==null);n&&(r.classList.remove("current"),n.classList.add("current"))}}function Fe(t,e){let r=t.querySelector(".current");if(r||(r=t.querySelector("li:first-child")),r){let n=r.querySelector("a");n&&(window.location.href=n.href),e.blur()}}function le(t,e){if(e==="")return t;let r=t.toLocaleLowerCase(),n=e.toLocaleLowerCase(),i=[],s=0,o=r.indexOf(n);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+n.length))}`),s=o+n.length,o=r.indexOf(n,s);return i.push(K(t.substring(s))),i.join("")}var Me={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Me[e])}var P=class{constructor(e){this.el=e.el,this.app=e.app}};var M="mousedown",fe="mousemove",N="mouseup",J={x:0,y:0},he=!1,ee=!1,De=!1,D=!1,pe=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(pe?"is-mobile":"not-mobile");pe&&"ontouchstart"in document.documentElement&&(De=!0,M="touchstart",fe="touchmove",N="touchend");document.addEventListener(M,t=>{ee=!0,D=!1;let e=M=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(fe,t=>{if(ee&&!D){let e=M=="touchstart"?t.targetTouches[0]:t,r=J.x-(e.pageX||0),n=J.y-(e.pageY||0);D=Math.sqrt(r*r+n*n)>10}});document.addEventListener(N,()=>{ee=!1});document.addEventListener("click",t=>{he&&(t.preventDefault(),t.stopImmediatePropagation(),he=!1)});var X=class extends P{constructor(r){super(r);this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(M,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,n=>this.onDocumentPointerUp(n))}setActive(r){if(this.active==r)return;this.active=r,document.documentElement.classList.toggle("has-"+this.className,r),this.el.classList.toggle("active",r);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(r){D||(this.setActive(!0),r.preventDefault())}onDocumentPointerDown(r){if(this.active){if(r.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(r){if(!D&&this.active&&r.target.closest(".col-sidebar")){let n=r.target.closest("a");if(n){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substring(0,i.indexOf("#"))),n.href.substring(0,i.length)==i&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var me=document.head.appendChild(document.createElement("style"));me.dataset.for="filters";var Y=class extends P{constructor(r){super(r);this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),me.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`}fromLocalStorage(){let r=Q.getItem(this.key);return r?r==="true":this.el.checked}setLocalStorage(r){Q.setItem(this.key,r.toString()),this.value=r,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let n=Array.from(r.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);r.style.display=n?"none":"block"})}};var Z=class extends P{constructor(r){super(r);this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update()),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ve(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}de();G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var ge=document.getElementById("tsd-theme");ge&&ve(ge);var Ae=new U;Object.defineProperty(window,"app",{value:Ae});document.querySelectorAll("summary a").forEach(t=>{t.addEventListener("click",()=>{location.assign(t.href)})});})(); +"use strict";(()=>{var Ce=Object.create;var ne=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Pe(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Ce(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),y=s.str.charAt(1),p;y in s.node.edges?p=s.node.edges[y]:(p=new t.TokenSet,s.node.edges[y]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(console.log("Show page"),document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){console.log("Scorlling");let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!e.checkVisibility()){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ve(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ne(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ve(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${ce(l.parent,i)}.${d}`);let y=document.createElement("li");y.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,y.append(p),e.appendChild(y)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ne(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var He={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>He[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",fe="mousemove",H="mouseup",J={x:0,y:0},pe=!1,ee=!1,Be=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(Be=!0,F="touchstart",fe="touchmove",H="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(fe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(H,()=>{ee=!1});document.addEventListener("click",t=>{pe&&(t.preventDefault(),t.stopImmediatePropagation(),pe=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(H,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(H,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ye=document.head.appendChild(document.createElement("style"));ye.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ye.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ve(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ve(t.value)})}function ve(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.pathname===r.pathname&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); /*! Bundled license information: lunr/lunr.js: diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js new file mode 100644 index 0000000..73b0be4 --- /dev/null +++ b/docs/assets/navigation.js @@ -0,0 +1 @@ +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACpWX227bMAyG38XXwYp1XTHkbkszIMCCFEmHXRRFoMhKrMWRPVnOFgx798mnRifS6l0R/fxIihTNPv9NFPujkmmyEGlx4orscpZMkpKoTP94KtI6Z9WNcfguU6dcK45cpMn0dpLQjOepZCKZPuMwmpOqcmAg+P3tp3+TEG9VKl6I6orlQjG5JxQm9yZO5B/vDQdrRgux54daRjvwTTAHm4zIdH5mQj0QRUbhttwHvxjo74rnfsmaX6NqNcu5dtP6MpJmoj71EFNgE+0S6UQEyVdlmGKcw5BvfCeJvCDBWAoYtCRcbJQkih0uUESOBoatye9FSZesqsiBPV1KFsR5Khj4lElG0rH4PBUM/LwrZNs4YHO1REuGdatRcpzoCDHm0ABtEBt+0H/C3IA4hq0vCY/XEcYwH6V+lRUbZ/ZClFnSuZSFHAnSUGE0s4FxoqtEqV0HI7BOgI5T8y3AJEuGTk9yZv31YuO5hfpalKyda81q95NRhUBNGcazHy1eFV+LkiURVdk/YARqyjDeXJz1NWk758mcieSNbc+zZTbww605M7JaHK+YfS1oe/v9oGhObev7O8P6geXkAlq3p4j1V6ZoBlq3p2PWfYUrnDKoENqSHNnroF2zXzWrFAgNiT22+bGn7cBNwp/ydmuYDQpnIegst4Ymaj0IModVLsAE+fZG90ik4iQfZqf7xTe6OuAjaIwvSYZ5eF/y3URvUCAbvqZuqGC+mut6sUtfCFpL7ZtegPrPrgqwC66SrSeP2xdhJ6/5ok5G3HaJT0L+lkToD4WMzqrXvzUtz81IXoObMc9+SXlJgVJ+IRVbtKdOqtpk2x9G5eWBhmRMUBDoFqIR/SjkMVSAAdadRwfm4tzYehxE9lqlbScsRlPxhv+OsDgtJMx3Y21WMizS63lUnCGcGaWBg8h+e566Lr6Z5XWlRy34/Hrd1tZF3m8YPcQOoDFP9ofGVmLbY5QrcKXUN/cfMrtgv00RAAA=" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index 7c090cd..a1513c4 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = JSON.parse("{\"rows\":[{\"kind\":2,\"name\":\"client/ShardClient\",\"url\":\"modules/client_ShardClient.html\",\"classes\":\"\"},{\"kind\":256,\"name\":\"PartialInternalEvents\",\"url\":\"interfaces/client_ShardClient.PartialInternalEvents.html\",\"classes\":\"\",\"parent\":\"client/ShardClient\"},{\"kind\":1024,\"name\":\"op\",\"url\":\"interfaces/client_ShardClient.PartialInternalEvents.html#op\",\"classes\":\"\",\"parent\":\"client/ShardClient.PartialInternalEvents\"},{\"kind\":1024,\"name\":\"data\",\"url\":\"interfaces/client_ShardClient.PartialInternalEvents.html#data\",\"classes\":\"\",\"parent\":\"client/ShardClient.PartialInternalEvents\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/client_ShardClient.PartialInternalEvents.html#data.__type\",\"classes\":\"\",\"parent\":\"client/ShardClient.PartialInternalEvents.data\"},{\"kind\":1024,\"name\":\"clusterId\",\"url\":\"interfaces/client_ShardClient.PartialInternalEvents.html#data.__type.clusterId\",\"classes\":\"\",\"parent\":\"client/ShardClient.PartialInternalEvents.data.__type\"},{\"kind\":1024,\"name\":\"shardId\",\"url\":\"interfaces/client_ShardClient.PartialInternalEvents.html#data.__type.shardId\",\"classes\":\"\",\"parent\":\"client/ShardClient.PartialInternalEvents.data.__type\"},{\"kind\":1024,\"name\":\"replayed\",\"url\":\"interfaces/client_ShardClient.PartialInternalEvents.html#data.__type.replayed\",\"classes\":\"\",\"parent\":\"client/ShardClient.PartialInternalEvents.data.__type\"},{\"kind\":1024,\"name\":\"event\",\"url\":\"interfaces/client_ShardClient.PartialInternalEvents.html#data.__type.event\",\"classes\":\"\",\"parent\":\"client/ShardClient.PartialInternalEvents.data.__type\"},{\"kind\":1024,\"name\":\"ipcId\",\"url\":\"interfaces/client_ShardClient.PartialInternalEvents.html#data.__type.ipcId\",\"classes\":\"\",\"parent\":\"client/ShardClient.PartialInternalEvents.data.__type\"},{\"kind\":128,\"name\":\"ShardClient\",\"url\":\"classes/client_ShardClient.ShardClient.html\",\"classes\":\"\",\"parent\":\"client/ShardClient\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/client_ShardClient.ShardClient.html#constructor\",\"classes\":\"\",\"parent\":\"client/ShardClient.ShardClient\"},{\"kind\":1024,\"name\":\"manager\",\"url\":\"classes/client_ShardClient.ShardClient.html#manager\",\"classes\":\"\",\"parent\":\"client/ShardClient.ShardClient\"},{\"kind\":1024,\"name\":\"client\",\"url\":\"classes/client_ShardClient.ShardClient.html#client\",\"classes\":\"\",\"parent\":\"client/ShardClient.ShardClient\"},{\"kind\":1024,\"name\":\"clusterId\",\"url\":\"classes/client_ShardClient.ShardClient.html#clusterId\",\"classes\":\"\",\"parent\":\"client/ShardClient.ShardClient\"},{\"kind\":2048,\"name\":\"start\",\"url\":\"classes/client_ShardClient.ShardClient.html#start\",\"classes\":\"\",\"parent\":\"client/ShardClient.ShardClient\"},{\"kind\":2048,\"name\":\"send\",\"url\":\"classes/client_ShardClient.ShardClient.html#send\",\"classes\":\"tsd-is-private\",\"parent\":\"client/ShardClient.ShardClient\"},{\"kind\":2,\"name\":\"client/ShardClientUtil\",\"url\":\"modules/client_ShardClientUtil.html\",\"classes\":\"\"},{\"kind\":128,\"name\":\"ShardClientUtil\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#constructor\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":2048,\"name\":\"on\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#on\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":2048,\"name\":\"once\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#once\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":2048,\"name\":\"off\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#off\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":1024,\"name\":\"client\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#client\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":1024,\"name\":\"mode\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#mode\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":1024,\"name\":\"ipc\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#ipc\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":1024,\"name\":\"clusterId\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#clusterId\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":1024,\"name\":\"clusterCount\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#clusterCount\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":1024,\"name\":\"shardIds\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#shardIds\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":1024,\"name\":\"shardCount\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#shardCount\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":2048,\"name\":\"ping\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#ping\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":2048,\"name\":\"broadcastEval\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#broadcastEval\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":2048,\"name\":\"fetchClientValues\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#fetchClientValues\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":2048,\"name\":\"fetchSessions\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#fetchSessions\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":2048,\"name\":\"restart\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#restart\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":2048,\"name\":\"restartAll\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#restartAll\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":2048,\"name\":\"send\",\"url\":\"classes/client_ShardClientUtil.ShardClientUtil.html#send\",\"classes\":\"\",\"parent\":\"client/ShardClientUtil.ShardClientUtil\"},{\"kind\":2,\"name\":\"concurrency/ConcurrencyClient\",\"url\":\"modules/concurrency_ConcurrencyClient.html\",\"classes\":\"\"},{\"kind\":128,\"name\":\"ConcurrencyClient\",\"url\":\"classes/concurrency_ConcurrencyClient.ConcurrencyClient.html\",\"classes\":\"\",\"parent\":\"concurrency/ConcurrencyClient\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/concurrency_ConcurrencyClient.ConcurrencyClient.html#constructor\",\"classes\":\"\",\"parent\":\"concurrency/ConcurrencyClient.ConcurrencyClient\"},{\"kind\":1024,\"name\":\"shard\",\"url\":\"classes/concurrency_ConcurrencyClient.ConcurrencyClient.html#shard\",\"classes\":\"tsd-is-private\",\"parent\":\"concurrency/ConcurrencyClient.ConcurrencyClient\"},{\"kind\":2048,\"name\":\"waitForIdentify\",\"url\":\"classes/concurrency_ConcurrencyClient.ConcurrencyClient.html#waitForIdentify\",\"classes\":\"\",\"parent\":\"concurrency/ConcurrencyClient.ConcurrencyClient\"},{\"kind\":2048,\"name\":\"abortIdentify\",\"url\":\"classes/concurrency_ConcurrencyClient.ConcurrencyClient.html#abortIdentify\",\"classes\":\"tsd-is-private\",\"parent\":\"concurrency/ConcurrencyClient.ConcurrencyClient\"},{\"kind\":2,\"name\":\"concurrency/ConcurrencyManager\",\"url\":\"modules/concurrency_ConcurrencyManager.html\",\"classes\":\"\"},{\"kind\":128,\"name\":\"ConcurrencyManager\",\"url\":\"classes/concurrency_ConcurrencyManager.ConcurrencyManager.html\",\"classes\":\"\",\"parent\":\"concurrency/ConcurrencyManager\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/concurrency_ConcurrencyManager.ConcurrencyManager.html#constructor\",\"classes\":\"\",\"parent\":\"concurrency/ConcurrencyManager.ConcurrencyManager\"},{\"kind\":1024,\"name\":\"throttler\",\"url\":\"classes/concurrency_ConcurrencyManager.ConcurrencyManager.html#throttler\",\"classes\":\"tsd-is-private\",\"parent\":\"concurrency/ConcurrencyManager.ConcurrencyManager\"},{\"kind\":1024,\"name\":\"signals\",\"url\":\"classes/concurrency_ConcurrencyManager.ConcurrencyManager.html#signals\",\"classes\":\"tsd-is-private\",\"parent\":\"concurrency/ConcurrencyManager.ConcurrencyManager\"},{\"kind\":2048,\"name\":\"waitForIdentify\",\"url\":\"classes/concurrency_ConcurrencyManager.ConcurrencyManager.html#waitForIdentify\",\"classes\":\"\",\"parent\":\"concurrency/ConcurrencyManager.ConcurrencyManager\"},{\"kind\":2048,\"name\":\"abortIdentify\",\"url\":\"classes/concurrency_ConcurrencyManager.ConcurrencyManager.html#abortIdentify\",\"classes\":\"\",\"parent\":\"concurrency/ConcurrencyManager.ConcurrencyManager\"},{\"kind\":2,\"name\":\"Indomitable\",\"url\":\"modules/Indomitable.html\",\"classes\":\"\"},{\"kind\":256,\"name\":\"IndomitableOptions\",\"url\":\"interfaces/Indomitable.IndomitableOptions.html\",\"classes\":\"\",\"parent\":\"Indomitable\"},{\"kind\":1024,\"name\":\"clusterCount\",\"url\":\"interfaces/Indomitable.IndomitableOptions.html#clusterCount\",\"classes\":\"\",\"parent\":\"Indomitable.IndomitableOptions\"},{\"kind\":1024,\"name\":\"shardCount\",\"url\":\"interfaces/Indomitable.IndomitableOptions.html#shardCount\",\"classes\":\"\",\"parent\":\"Indomitable.IndomitableOptions\"},{\"kind\":1024,\"name\":\"clientOptions\",\"url\":\"interfaces/Indomitable.IndomitableOptions.html#clientOptions\",\"classes\":\"\",\"parent\":\"Indomitable.IndomitableOptions\"},{\"kind\":1024,\"name\":\"clusterSettings\",\"url\":\"interfaces/Indomitable.IndomitableOptions.html#clusterSettings\",\"classes\":\"\",\"parent\":\"Indomitable.IndomitableOptions\"},{\"kind\":1024,\"name\":\"ipcTimeout\",\"url\":\"interfaces/Indomitable.IndomitableOptions.html#ipcTimeout\",\"classes\":\"\",\"parent\":\"Indomitable.IndomitableOptions\"},{\"kind\":1024,\"name\":\"spawnTimeout\",\"url\":\"interfaces/Indomitable.IndomitableOptions.html#spawnTimeout\",\"classes\":\"\",\"parent\":\"Indomitable.IndomitableOptions\"},{\"kind\":1024,\"name\":\"spawnDelay\",\"url\":\"interfaces/Indomitable.IndomitableOptions.html#spawnDelay\",\"classes\":\"\",\"parent\":\"Indomitable.IndomitableOptions\"},{\"kind\":1024,\"name\":\"autoRestart\",\"url\":\"interfaces/Indomitable.IndomitableOptions.html#autoRestart\",\"classes\":\"\",\"parent\":\"Indomitable.IndomitableOptions\"},{\"kind\":1024,\"name\":\"waitForReady\",\"url\":\"interfaces/Indomitable.IndomitableOptions.html#waitForReady\",\"classes\":\"\",\"parent\":\"Indomitable.IndomitableOptions\"},{\"kind\":1024,\"name\":\"handleConcurrency\",\"url\":\"interfaces/Indomitable.IndomitableOptions.html#handleConcurrency\",\"classes\":\"\",\"parent\":\"Indomitable.IndomitableOptions\"},{\"kind\":1024,\"name\":\"client\",\"url\":\"interfaces/Indomitable.IndomitableOptions.html#client\",\"classes\":\"\",\"parent\":\"Indomitable.IndomitableOptions\"},{\"kind\":1024,\"name\":\"token\",\"url\":\"interfaces/Indomitable.IndomitableOptions.html#token\",\"classes\":\"\",\"parent\":\"Indomitable.IndomitableOptions\"},{\"kind\":256,\"name\":\"ReconfigureOptions\",\"url\":\"interfaces/Indomitable.ReconfigureOptions.html\",\"classes\":\"\",\"parent\":\"Indomitable\"},{\"kind\":1024,\"name\":\"clusters\",\"url\":\"interfaces/Indomitable.ReconfigureOptions.html#clusters\",\"classes\":\"\",\"parent\":\"Indomitable.ReconfigureOptions\"},{\"kind\":1024,\"name\":\"shards\",\"url\":\"interfaces/Indomitable.ReconfigureOptions.html#shards\",\"classes\":\"\",\"parent\":\"Indomitable.ReconfigureOptions\"},{\"kind\":256,\"name\":\"ShardEventData\",\"url\":\"interfaces/Indomitable.ShardEventData.html\",\"classes\":\"\",\"parent\":\"Indomitable\"},{\"kind\":1024,\"name\":\"clusterId\",\"url\":\"interfaces/Indomitable.ShardEventData.html#clusterId\",\"classes\":\"\",\"parent\":\"Indomitable.ShardEventData\"},{\"kind\":1024,\"name\":\"shardId\",\"url\":\"interfaces/Indomitable.ShardEventData.html#shardId\",\"classes\":\"\",\"parent\":\"Indomitable.ShardEventData\"},{\"kind\":1024,\"name\":\"replayed\",\"url\":\"interfaces/Indomitable.ShardEventData.html#replayed\",\"classes\":\"\",\"parent\":\"Indomitable.ShardEventData\"},{\"kind\":1024,\"name\":\"event\",\"url\":\"interfaces/Indomitable.ShardEventData.html#event\",\"classes\":\"\",\"parent\":\"Indomitable.ShardEventData\"},{\"kind\":128,\"name\":\"Indomitable\",\"url\":\"classes/Indomitable.Indomitable.html\",\"classes\":\"\",\"parent\":\"Indomitable\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Indomitable.Indomitable.html#constructor\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":2048,\"name\":\"on\",\"url\":\"classes/Indomitable.Indomitable.html#on\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":2048,\"name\":\"once\",\"url\":\"classes/Indomitable.Indomitable.html#once\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":2048,\"name\":\"off\",\"url\":\"classes/Indomitable.Indomitable.html#off\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"clusterCount\",\"url\":\"classes/Indomitable.Indomitable.html#clusterCount\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"shardCount\",\"url\":\"classes/Indomitable.Indomitable.html#shardCount\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"cachedSession\",\"url\":\"classes/Indomitable.Indomitable.html#cachedSession\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"concurrencyManager\",\"url\":\"classes/Indomitable.Indomitable.html#concurrencyManager\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"clientOptions\",\"url\":\"classes/Indomitable.Indomitable.html#clientOptions\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"clusterSettings\",\"url\":\"classes/Indomitable.Indomitable.html#clusterSettings\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"ipcTimeout\",\"url\":\"classes/Indomitable.Indomitable.html#ipcTimeout\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"spawnTimeout\",\"url\":\"classes/Indomitable.Indomitable.html#spawnTimeout\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"spawnDelay\",\"url\":\"classes/Indomitable.Indomitable.html#spawnDelay\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"autoRestart\",\"url\":\"classes/Indomitable.Indomitable.html#autoRestart\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"waitForReady\",\"url\":\"classes/Indomitable.Indomitable.html#waitForReady\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"handleConcurrency\",\"url\":\"classes/Indomitable.Indomitable.html#handleConcurrency\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"client\",\"url\":\"classes/Indomitable.Indomitable.html#client\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"clusters\",\"url\":\"classes/Indomitable.Indomitable.html#clusters\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"spawnQueue\",\"url\":\"classes/Indomitable.Indomitable.html#spawnQueue\",\"classes\":\"tsd-is-private\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"token\",\"url\":\"classes/Indomitable.Indomitable.html#token\",\"classes\":\"tsd-is-private\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":1024,\"name\":\"busy\",\"url\":\"classes/Indomitable.Indomitable.html#busy\",\"classes\":\"tsd-is-private\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":262144,\"name\":\"isBusy\",\"url\":\"classes/Indomitable.Indomitable.html#isBusy\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":262144,\"name\":\"inSpawnQueueCount\",\"url\":\"classes/Indomitable.Indomitable.html#inSpawnQueueCount\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":2048,\"name\":\"fetchSessions\",\"url\":\"classes/Indomitable.Indomitable.html#fetchSessions\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":2048,\"name\":\"spawn\",\"url\":\"classes/Indomitable.Indomitable.html#spawn\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":2048,\"name\":\"restart\",\"url\":\"classes/Indomitable.Indomitable.html#restart\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":2048,\"name\":\"restartAll\",\"url\":\"classes/Indomitable.Indomitable.html#restartAll\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":2048,\"name\":\"send\",\"url\":\"classes/Indomitable.Indomitable.html#send\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":2048,\"name\":\"broadcast\",\"url\":\"classes/Indomitable.Indomitable.html#broadcast\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":2048,\"name\":\"reconfigure\",\"url\":\"classes/Indomitable.Indomitable.html#reconfigure\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":2048,\"name\":\"addToSpawnQueue\",\"url\":\"classes/Indomitable.Indomitable.html#addToSpawnQueue\",\"classes\":\"\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":2048,\"name\":\"destroyClusterClient\",\"url\":\"classes/Indomitable.Indomitable.html#destroyClusterClient\",\"classes\":\"tsd-is-private\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":2048,\"name\":\"processQueue\",\"url\":\"classes/Indomitable.Indomitable.html#processQueue\",\"classes\":\"tsd-is-private\",\"parent\":\"Indomitable.Indomitable\"},{\"kind\":2,\"name\":\"ipc/BaseIpc\",\"url\":\"modules/ipc_BaseIpc.html\",\"classes\":\"\"},{\"kind\":128,\"name\":\"BaseIpc\",\"url\":\"classes/ipc_BaseIpc.BaseIpc.html\",\"classes\":\"\",\"parent\":\"ipc/BaseIpc\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ipc_BaseIpc.BaseIpc.html#constructor\",\"classes\":\"tsd-is-protected\",\"parent\":\"ipc/BaseIpc.BaseIpc\"},{\"kind\":1024,\"name\":\"manager\",\"url\":\"classes/ipc_BaseIpc.BaseIpc.html#manager\",\"classes\":\"\",\"parent\":\"ipc/BaseIpc.BaseIpc\"},{\"kind\":1024,\"name\":\"promises\",\"url\":\"classes/ipc_BaseIpc.BaseIpc.html#promises\",\"classes\":\"tsd-is-protected\",\"parent\":\"ipc/BaseIpc.BaseIpc\"},{\"kind\":262144,\"name\":\"pendingPromises\",\"url\":\"classes/ipc_BaseIpc.BaseIpc.html#pendingPromises\",\"classes\":\"\",\"parent\":\"ipc/BaseIpc.BaseIpc\"},{\"kind\":2048,\"name\":\"flushPromises\",\"url\":\"classes/ipc_BaseIpc.BaseIpc.html#flushPromises\",\"classes\":\"\",\"parent\":\"ipc/BaseIpc.BaseIpc\"},{\"kind\":2048,\"name\":\"handleRawResponse\",\"url\":\"classes/ipc_BaseIpc.BaseIpc.html#handleRawResponse\",\"classes\":\"\",\"parent\":\"ipc/BaseIpc.BaseIpc\"},{\"kind\":2048,\"name\":\"waitForPromise\",\"url\":\"classes/ipc_BaseIpc.BaseIpc.html#waitForPromise\",\"classes\":\"tsd-is-protected\",\"parent\":\"ipc/BaseIpc.BaseIpc\"},{\"kind\":2048,\"name\":\"handlePromise\",\"url\":\"classes/ipc_BaseIpc.BaseIpc.html#handlePromise\",\"classes\":\"tsd-is-private\",\"parent\":\"ipc/BaseIpc.BaseIpc\"},{\"kind\":2048,\"name\":\"handleMessage\",\"url\":\"classes/ipc_BaseIpc.BaseIpc.html#handleMessage\",\"classes\":\"tsd-is-protected\",\"parent\":\"ipc/BaseIpc.BaseIpc\"},{\"kind\":2,\"name\":\"ipc/Main\",\"url\":\"modules/ipc_Main.html\",\"classes\":\"\"},{\"kind\":128,\"name\":\"Main\",\"url\":\"classes/ipc_Main.Main.html\",\"classes\":\"\",\"parent\":\"ipc/Main\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ipc_Main.Main.html#constructor\",\"classes\":\"\",\"parent\":\"ipc/Main.Main\"},{\"kind\":1024,\"name\":\"cluster\",\"url\":\"classes/ipc_Main.Main.html#cluster\",\"classes\":\"\",\"parent\":\"ipc/Main.Main\"},{\"kind\":2048,\"name\":\"send\",\"url\":\"classes/ipc_Main.Main.html#send\",\"classes\":\"\",\"parent\":\"ipc/Main.Main\"},{\"kind\":2048,\"name\":\"handleMessage\",\"url\":\"classes/ipc_Main.Main.html#handleMessage\",\"classes\":\"tsd-is-protected\",\"parent\":\"ipc/Main.Main\"},{\"kind\":1024,\"name\":\"manager\",\"url\":\"classes/ipc_Main.Main.html#manager\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ipc/Main.Main\"},{\"kind\":1024,\"name\":\"promises\",\"url\":\"classes/ipc_Main.Main.html#promises\",\"classes\":\"tsd-is-protected tsd-is-inherited\",\"parent\":\"ipc/Main.Main\"},{\"kind\":262144,\"name\":\"pendingPromises\",\"url\":\"classes/ipc_Main.Main.html#pendingPromises\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ipc/Main.Main\"},{\"kind\":2048,\"name\":\"flushPromises\",\"url\":\"classes/ipc_Main.Main.html#flushPromises\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ipc/Main.Main\"},{\"kind\":2048,\"name\":\"handleRawResponse\",\"url\":\"classes/ipc_Main.Main.html#handleRawResponse\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ipc/Main.Main\"},{\"kind\":2048,\"name\":\"waitForPromise\",\"url\":\"classes/ipc_Main.Main.html#waitForPromise\",\"classes\":\"tsd-is-protected tsd-is-inherited\",\"parent\":\"ipc/Main.Main\"},{\"kind\":2,\"name\":\"ipc/Worker\",\"url\":\"modules/ipc_Worker.html\",\"classes\":\"\"},{\"kind\":128,\"name\":\"Worker\",\"url\":\"classes/ipc_Worker.Worker.html\",\"classes\":\"\",\"parent\":\"ipc/Worker\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ipc_Worker.Worker.html#constructor\",\"classes\":\"\",\"parent\":\"ipc/Worker.Worker\"},{\"kind\":1024,\"name\":\"shard\",\"url\":\"classes/ipc_Worker.Worker.html#shard\",\"classes\":\"\",\"parent\":\"ipc/Worker.Worker\"},{\"kind\":2048,\"name\":\"send\",\"url\":\"classes/ipc_Worker.Worker.html#send\",\"classes\":\"\",\"parent\":\"ipc/Worker.Worker\"},{\"kind\":2048,\"name\":\"handleMessage\",\"url\":\"classes/ipc_Worker.Worker.html#handleMessage\",\"classes\":\"tsd-is-protected\",\"parent\":\"ipc/Worker.Worker\"},{\"kind\":1024,\"name\":\"manager\",\"url\":\"classes/ipc_Worker.Worker.html#manager\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ipc/Worker.Worker\"},{\"kind\":1024,\"name\":\"promises\",\"url\":\"classes/ipc_Worker.Worker.html#promises\",\"classes\":\"tsd-is-protected tsd-is-inherited\",\"parent\":\"ipc/Worker.Worker\"},{\"kind\":262144,\"name\":\"pendingPromises\",\"url\":\"classes/ipc_Worker.Worker.html#pendingPromises\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ipc/Worker.Worker\"},{\"kind\":2048,\"name\":\"flushPromises\",\"url\":\"classes/ipc_Worker.Worker.html#flushPromises\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ipc/Worker.Worker\"},{\"kind\":2048,\"name\":\"handleRawResponse\",\"url\":\"classes/ipc_Worker.Worker.html#handleRawResponse\",\"classes\":\"tsd-is-inherited\",\"parent\":\"ipc/Worker.Worker\"},{\"kind\":2048,\"name\":\"waitForPromise\",\"url\":\"classes/ipc_Worker.Worker.html#waitForPromise\",\"classes\":\"tsd-is-protected tsd-is-inherited\",\"parent\":\"ipc/Worker.Worker\"},{\"kind\":2,\"name\":\"manager/ClusterManager\",\"url\":\"modules/manager_ClusterManager.html\",\"classes\":\"\"},{\"kind\":256,\"name\":\"ClusterManagerOptions\",\"url\":\"interfaces/manager_ClusterManager.ClusterManagerOptions.html\",\"classes\":\"\",\"parent\":\"manager/ClusterManager\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/manager_ClusterManager.ClusterManagerOptions.html#id\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManagerOptions\"},{\"kind\":1024,\"name\":\"shards\",\"url\":\"interfaces/manager_ClusterManager.ClusterManagerOptions.html#shards\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManagerOptions\"},{\"kind\":1024,\"name\":\"manager\",\"url\":\"interfaces/manager_ClusterManager.ClusterManagerOptions.html#manager\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManagerOptions\"},{\"kind\":128,\"name\":\"ClusterManager\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html\",\"classes\":\"\",\"parent\":\"manager/ClusterManager\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html#constructor\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManager\"},{\"kind\":1024,\"name\":\"manager\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html#manager\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManager\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html#id\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManager\"},{\"kind\":1024,\"name\":\"ipc\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html#ipc\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManager\"},{\"kind\":1024,\"name\":\"shards\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html#shards\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManager\"},{\"kind\":1024,\"name\":\"started\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html#started\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManager\"},{\"kind\":1024,\"name\":\"ready\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html#ready\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManager\"},{\"kind\":1024,\"name\":\"readyAt\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html#readyAt\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManager\"},{\"kind\":1024,\"name\":\"worker\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html#worker\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManager\"},{\"kind\":2048,\"name\":\"destroy\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html#destroy\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManager\"},{\"kind\":2048,\"name\":\"respawn\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html#respawn\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManager\"},{\"kind\":2048,\"name\":\"spawn\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html#spawn\",\"classes\":\"\",\"parent\":\"manager/ClusterManager.ClusterManager\"},{\"kind\":2048,\"name\":\"cleanup\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html#cleanup\",\"classes\":\"tsd-is-private\",\"parent\":\"manager/ClusterManager.ClusterManager\"},{\"kind\":2048,\"name\":\"wait\",\"url\":\"classes/manager_ClusterManager.ClusterManager.html#wait\",\"classes\":\"tsd-is-private\",\"parent\":\"manager/ClusterManager.ClusterManager\"},{\"kind\":2,\"name\":\"Util\",\"url\":\"modules/Util.html\",\"classes\":\"\"},{\"kind\":64,\"name\":\"Fetch\",\"url\":\"functions/Util.Fetch.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":64,\"name\":\"FetchSessions\",\"url\":\"functions/Util.FetchSessions.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":64,\"name\":\"Chunk\",\"url\":\"functions/Util.Chunk.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":64,\"name\":\"Delay\",\"url\":\"functions/Util.Delay.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":64,\"name\":\"MakeAbortableRequest\",\"url\":\"functions/Util.MakeAbortableRequest.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":8,\"name\":\"ClientEvents\",\"url\":\"enums/Util.ClientEvents.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":16,\"name\":\"EVAL\",\"url\":\"enums/Util.ClientEvents.html#EVAL\",\"classes\":\"\",\"parent\":\"Util.ClientEvents\"},{\"kind\":16,\"name\":\"RESTART\",\"url\":\"enums/Util.ClientEvents.html#RESTART\",\"classes\":\"\",\"parent\":\"Util.ClientEvents\"},{\"kind\":16,\"name\":\"RESTART_ALL\",\"url\":\"enums/Util.ClientEvents.html#RESTART_ALL\",\"classes\":\"\",\"parent\":\"Util.ClientEvents\"},{\"kind\":16,\"name\":\"DESTROY_CLIENT\",\"url\":\"enums/Util.ClientEvents.html#DESTROY_CLIENT\",\"classes\":\"\",\"parent\":\"Util.ClientEvents\"},{\"kind\":16,\"name\":\"REQUEST_IDENTIFY\",\"url\":\"enums/Util.ClientEvents.html#REQUEST_IDENTIFY\",\"classes\":\"\",\"parent\":\"Util.ClientEvents\"},{\"kind\":16,\"name\":\"CANCEL_IDENTIFY\",\"url\":\"enums/Util.ClientEvents.html#CANCEL_IDENTIFY\",\"classes\":\"\",\"parent\":\"Util.ClientEvents\"},{\"kind\":16,\"name\":\"SESSION_INFO\",\"url\":\"enums/Util.ClientEvents.html#SESSION_INFO\",\"classes\":\"\",\"parent\":\"Util.ClientEvents\"},{\"kind\":16,\"name\":\"READY\",\"url\":\"enums/Util.ClientEvents.html#READY\",\"classes\":\"\",\"parent\":\"Util.ClientEvents\"},{\"kind\":16,\"name\":\"PING\",\"url\":\"enums/Util.ClientEvents.html#PING\",\"classes\":\"\",\"parent\":\"Util.ClientEvents\"},{\"kind\":16,\"name\":\"SHARD_READY\",\"url\":\"enums/Util.ClientEvents.html#SHARD_READY\",\"classes\":\"\",\"parent\":\"Util.ClientEvents\"},{\"kind\":16,\"name\":\"SHARD_RECONNECT\",\"url\":\"enums/Util.ClientEvents.html#SHARD_RECONNECT\",\"classes\":\"\",\"parent\":\"Util.ClientEvents\"},{\"kind\":16,\"name\":\"SHARD_RESUME\",\"url\":\"enums/Util.ClientEvents.html#SHARD_RESUME\",\"classes\":\"\",\"parent\":\"Util.ClientEvents\"},{\"kind\":16,\"name\":\"SHARD_DISCONNECT\",\"url\":\"enums/Util.ClientEvents.html#SHARD_DISCONNECT\",\"classes\":\"\",\"parent\":\"Util.ClientEvents\"},{\"kind\":8,\"name\":\"LibraryEvents\",\"url\":\"enums/Util.LibraryEvents.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":16,\"name\":\"DEBUG\",\"url\":\"enums/Util.LibraryEvents.html#DEBUG\",\"classes\":\"\",\"parent\":\"Util.LibraryEvents\"},{\"kind\":16,\"name\":\"MESSAGE\",\"url\":\"enums/Util.LibraryEvents.html#MESSAGE\",\"classes\":\"\",\"parent\":\"Util.LibraryEvents\"},{\"kind\":16,\"name\":\"ERROR\",\"url\":\"enums/Util.LibraryEvents.html#ERROR\",\"classes\":\"\",\"parent\":\"Util.LibraryEvents\"},{\"kind\":16,\"name\":\"WORKER_FORK\",\"url\":\"enums/Util.LibraryEvents.html#WORKER_FORK\",\"classes\":\"\",\"parent\":\"Util.LibraryEvents\"},{\"kind\":16,\"name\":\"WORKER_READY\",\"url\":\"enums/Util.LibraryEvents.html#WORKER_READY\",\"classes\":\"\",\"parent\":\"Util.LibraryEvents\"},{\"kind\":16,\"name\":\"WORKER_EXIT\",\"url\":\"enums/Util.LibraryEvents.html#WORKER_EXIT\",\"classes\":\"\",\"parent\":\"Util.LibraryEvents\"},{\"kind\":16,\"name\":\"SHARD_READY\",\"url\":\"enums/Util.LibraryEvents.html#SHARD_READY\",\"classes\":\"\",\"parent\":\"Util.LibraryEvents\"},{\"kind\":16,\"name\":\"SHARD_RECONNECT\",\"url\":\"enums/Util.LibraryEvents.html#SHARD_RECONNECT\",\"classes\":\"\",\"parent\":\"Util.LibraryEvents\"},{\"kind\":16,\"name\":\"SHARD_RESUME\",\"url\":\"enums/Util.LibraryEvents.html#SHARD_RESUME\",\"classes\":\"\",\"parent\":\"Util.LibraryEvents\"},{\"kind\":16,\"name\":\"SHARD_DISCONNECT\",\"url\":\"enums/Util.LibraryEvents.html#SHARD_DISCONNECT\",\"classes\":\"\",\"parent\":\"Util.LibraryEvents\"},{\"kind\":16,\"name\":\"CLIENT_READY\",\"url\":\"enums/Util.LibraryEvents.html#CLIENT_READY\",\"classes\":\"\",\"parent\":\"Util.LibraryEvents\"},{\"kind\":8,\"name\":\"RawIpcMessageType\",\"url\":\"enums/Util.RawIpcMessageType.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":16,\"name\":\"MESSAGE\",\"url\":\"enums/Util.RawIpcMessageType.html#MESSAGE\",\"classes\":\"\",\"parent\":\"Util.RawIpcMessageType\"},{\"kind\":16,\"name\":\"RESPONSE\",\"url\":\"enums/Util.RawIpcMessageType.html#RESPONSE\",\"classes\":\"\",\"parent\":\"Util.RawIpcMessageType\"},{\"kind\":256,\"name\":\"InternalEvents\",\"url\":\"interfaces/Util.InternalEvents.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":1024,\"name\":\"op\",\"url\":\"interfaces/Util.InternalEvents.html#op\",\"classes\":\"\",\"parent\":\"Util.InternalEvents\"},{\"kind\":1024,\"name\":\"data\",\"url\":\"interfaces/Util.InternalEvents.html#data\",\"classes\":\"\",\"parent\":\"Util.InternalEvents\"},{\"kind\":1024,\"name\":\"internal\",\"url\":\"interfaces/Util.InternalEvents.html#internal\",\"classes\":\"\",\"parent\":\"Util.InternalEvents\"},{\"kind\":256,\"name\":\"InternalError\",\"url\":\"interfaces/Util.InternalError.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":1024,\"name\":\"internal\",\"url\":\"interfaces/Util.InternalError.html#internal\",\"classes\":\"\",\"parent\":\"Util.InternalError\"},{\"kind\":1024,\"name\":\"error\",\"url\":\"interfaces/Util.InternalError.html#error\",\"classes\":\"\",\"parent\":\"Util.InternalError\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/Util.InternalError.html#name\",\"classes\":\"\",\"parent\":\"Util.InternalError\"},{\"kind\":1024,\"name\":\"reason\",\"url\":\"interfaces/Util.InternalError.html#reason\",\"classes\":\"\",\"parent\":\"Util.InternalError\"},{\"kind\":1024,\"name\":\"stack\",\"url\":\"interfaces/Util.InternalError.html#stack\",\"classes\":\"\",\"parent\":\"Util.InternalError\"},{\"kind\":256,\"name\":\"Transportable\",\"url\":\"interfaces/Util.Transportable.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":1024,\"name\":\"content\",\"url\":\"interfaces/Util.Transportable.html#content\",\"classes\":\"\",\"parent\":\"Util.Transportable\"},{\"kind\":1024,\"name\":\"repliable\",\"url\":\"interfaces/Util.Transportable.html#repliable\",\"classes\":\"\",\"parent\":\"Util.Transportable\"},{\"kind\":1024,\"name\":\"signal\",\"url\":\"interfaces/Util.Transportable.html#signal\",\"classes\":\"\",\"parent\":\"Util.Transportable\"},{\"kind\":256,\"name\":\"InternalAbortSignal\",\"url\":\"interfaces/Util.InternalAbortSignal.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":1024,\"name\":\"listener\",\"url\":\"interfaces/Util.InternalAbortSignal.html#listener\",\"classes\":\"\",\"parent\":\"Util.InternalAbortSignal\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/Util.InternalAbortSignal.html#listener.__type\",\"classes\":\"\",\"parent\":\"Util.InternalAbortSignal.listener\"},{\"kind\":1024,\"name\":\"signal\",\"url\":\"interfaces/Util.InternalAbortSignal.html#signal\",\"classes\":\"\",\"parent\":\"Util.InternalAbortSignal\"},{\"kind\":256,\"name\":\"SavePromiseOptions\",\"url\":\"interfaces/Util.SavePromiseOptions.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/Util.SavePromiseOptions.html#id\",\"classes\":\"\",\"parent\":\"Util.SavePromiseOptions\"},{\"kind\":1024,\"name\":\"resolve\",\"url\":\"interfaces/Util.SavePromiseOptions.html#resolve\",\"classes\":\"\",\"parent\":\"Util.SavePromiseOptions\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/Util.SavePromiseOptions.html#resolve.__type-2\",\"classes\":\"\",\"parent\":\"Util.SavePromiseOptions.resolve\"},{\"kind\":1024,\"name\":\"reject\",\"url\":\"interfaces/Util.SavePromiseOptions.html#reject\",\"classes\":\"\",\"parent\":\"Util.SavePromiseOptions\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/Util.SavePromiseOptions.html#reject.__type\",\"classes\":\"\",\"parent\":\"Util.SavePromiseOptions.reject\"},{\"kind\":1024,\"name\":\"signal\",\"url\":\"interfaces/Util.SavePromiseOptions.html#signal\",\"classes\":\"\",\"parent\":\"Util.SavePromiseOptions\"},{\"kind\":256,\"name\":\"AbortableData\",\"url\":\"interfaces/Util.AbortableData.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":1024,\"name\":\"controller\",\"url\":\"interfaces/Util.AbortableData.html#controller\",\"classes\":\"\",\"parent\":\"Util.AbortableData\"},{\"kind\":1024,\"name\":\"timeout\",\"url\":\"interfaces/Util.AbortableData.html#timeout\",\"classes\":\"\",\"parent\":\"Util.AbortableData\"},{\"kind\":256,\"name\":\"InternalPromise\",\"url\":\"interfaces/Util.InternalPromise.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":1024,\"name\":\"resolve\",\"url\":\"interfaces/Util.InternalPromise.html#resolve\",\"classes\":\"\",\"parent\":\"Util.InternalPromise\"},{\"kind\":1024,\"name\":\"reject\",\"url\":\"interfaces/Util.InternalPromise.html#reject\",\"classes\":\"\",\"parent\":\"Util.InternalPromise\"},{\"kind\":1024,\"name\":\"controller\",\"url\":\"interfaces/Util.InternalPromise.html#controller\",\"classes\":\"\",\"parent\":\"Util.InternalPromise\"},{\"kind\":256,\"name\":\"RawIpcMessage\",\"url\":\"interfaces/Util.RawIpcMessage.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/Util.RawIpcMessage.html#id\",\"classes\":\"\",\"parent\":\"Util.RawIpcMessage\"},{\"kind\":1024,\"name\":\"content\",\"url\":\"interfaces/Util.RawIpcMessage.html#content\",\"classes\":\"\",\"parent\":\"Util.RawIpcMessage\"},{\"kind\":1024,\"name\":\"internal\",\"url\":\"interfaces/Util.RawIpcMessage.html#internal\",\"classes\":\"\",\"parent\":\"Util.RawIpcMessage\"},{\"kind\":1024,\"name\":\"type\",\"url\":\"interfaces/Util.RawIpcMessage.html#type\",\"classes\":\"\",\"parent\":\"Util.RawIpcMessage\"},{\"kind\":256,\"name\":\"Message\",\"url\":\"interfaces/Util.Message.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":1024,\"name\":\"reply\",\"url\":\"interfaces/Util.Message.html#reply\",\"classes\":\"\",\"parent\":\"Util.Message\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/Util.Message.html#reply.__type\",\"classes\":\"\",\"parent\":\"Util.Message.reply\"},{\"kind\":1024,\"name\":\"content\",\"url\":\"interfaces/Util.Message.html#content\",\"classes\":\"\",\"parent\":\"Util.Message\"},{\"kind\":1024,\"name\":\"repliable\",\"url\":\"interfaces/Util.Message.html#repliable\",\"classes\":\"\",\"parent\":\"Util.Message\"},{\"kind\":256,\"name\":\"SessionObject\",\"url\":\"interfaces/Util.SessionObject.html\",\"classes\":\"\",\"parent\":\"Util\"},{\"kind\":1024,\"name\":\"url\",\"url\":\"interfaces/Util.SessionObject.html#url\",\"classes\":\"\",\"parent\":\"Util.SessionObject\"},{\"kind\":1024,\"name\":\"shards\",\"url\":\"interfaces/Util.SessionObject.html#shards\",\"classes\":\"\",\"parent\":\"Util.SessionObject\"},{\"kind\":1024,\"name\":\"session_start_limit\",\"url\":\"interfaces/Util.SessionObject.html#session_start_limit\",\"classes\":\"\",\"parent\":\"Util.SessionObject\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/Util.SessionObject.html#session_start_limit.__type\",\"classes\":\"\",\"parent\":\"Util.SessionObject.session_start_limit\"},{\"kind\":1024,\"name\":\"total\",\"url\":\"interfaces/Util.SessionObject.html#session_start_limit.__type.total\",\"classes\":\"\",\"parent\":\"Util.SessionObject.session_start_limit.__type\"},{\"kind\":1024,\"name\":\"remaining\",\"url\":\"interfaces/Util.SessionObject.html#session_start_limit.__type.remaining\",\"classes\":\"\",\"parent\":\"Util.SessionObject.session_start_limit.__type\"},{\"kind\":1024,\"name\":\"reset_after\",\"url\":\"interfaces/Util.SessionObject.html#session_start_limit.__type.reset_after\",\"classes\":\"\",\"parent\":\"Util.SessionObject.session_start_limit.__type\"},{\"kind\":1024,\"name\":\"max_concurrency\",\"url\":\"interfaces/Util.SessionObject.html#session_start_limit.__type.max_concurrency\",\"classes\":\"\",\"parent\":\"Util.SessionObject.session_start_limit.__type\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,51.08]],[\"comment/0\",[]],[\"name/1\",[1,51.08]],[\"comment/1\",[]],[\"name/2\",[2,45.971]],[\"comment/2\",[]],[\"name/3\",[3,45.971]],[\"comment/3\",[]],[\"name/4\",[4,36.416]],[\"comment/4\",[]],[\"name/5\",[5,40.094]],[\"comment/5\",[]],[\"name/6\",[6,45.971]],[\"comment/6\",[]],[\"name/7\",[7,45.971]],[\"comment/7\",[]],[\"name/8\",[8,45.971]],[\"comment/8\",[]],[\"name/9\",[9,51.08]],[\"comment/9\",[]],[\"name/10\",[10,51.08]],[\"comment/10\",[]],[\"name/11\",[11,32.621]],[\"comment/11\",[]],[\"name/12\",[12,36.416]],[\"comment/12\",[]],[\"name/13\",[13,40.094]],[\"comment/13\",[]],[\"name/14\",[5,40.094]],[\"comment/14\",[]],[\"name/15\",[14,51.08]],[\"comment/15\",[]],[\"name/16\",[15,38.087]],[\"comment/16\",[]],[\"name/17\",[16,51.08]],[\"comment/17\",[]],[\"name/18\",[17,51.08]],[\"comment/18\",[]],[\"name/19\",[11,32.621]],[\"comment/19\",[]],[\"name/20\",[18,45.971]],[\"comment/20\",[]],[\"name/21\",[19,45.971]],[\"comment/21\",[]],[\"name/22\",[20,45.971]],[\"comment/22\",[]],[\"name/23\",[13,40.094]],[\"comment/23\",[]],[\"name/24\",[21,51.08]],[\"comment/24\",[]],[\"name/25\",[22,45.971]],[\"comment/25\",[]],[\"name/26\",[5,40.094]],[\"comment/26\",[]],[\"name/27\",[23,42.607]],[\"comment/27\",[]],[\"name/28\",[24,51.08]],[\"comment/28\",[]],[\"name/29\",[25,42.607]],[\"comment/29\",[]],[\"name/30\",[26,45.971]],[\"comment/30\",[]],[\"name/31\",[27,51.08]],[\"comment/31\",[]],[\"name/32\",[28,51.08]],[\"comment/32\",[]],[\"name/33\",[29,42.607]],[\"comment/33\",[]],[\"name/34\",[30,42.607]],[\"comment/34\",[]],[\"name/35\",[31,45.971]],[\"comment/35\",[]],[\"name/36\",[15,38.087]],[\"comment/36\",[]],[\"name/37\",[32,51.08]],[\"comment/37\",[]],[\"name/38\",[33,51.08]],[\"comment/38\",[]],[\"name/39\",[11,32.621]],[\"comment/39\",[]],[\"name/40\",[34,45.971]],[\"comment/40\",[]],[\"name/41\",[35,45.971]],[\"comment/41\",[]],[\"name/42\",[36,45.971]],[\"comment/42\",[]],[\"name/43\",[37,51.08]],[\"comment/43\",[]],[\"name/44\",[38,45.971]],[\"comment/44\",[]],[\"name/45\",[11,32.621]],[\"comment/45\",[]],[\"name/46\",[39,51.08]],[\"comment/46\",[]],[\"name/47\",[40,51.08]],[\"comment/47\",[]],[\"name/48\",[35,45.971]],[\"comment/48\",[]],[\"name/49\",[36,45.971]],[\"comment/49\",[]],[\"name/50\",[41,45.971]],[\"comment/50\",[]],[\"name/51\",[42,51.08]],[\"comment/51\",[]],[\"name/52\",[23,42.607]],[\"comment/52\",[]],[\"name/53\",[25,42.607]],[\"comment/53\",[]],[\"name/54\",[43,45.971]],[\"comment/54\",[]],[\"name/55\",[44,45.971]],[\"comment/55\",[]],[\"name/56\",[45,45.971]],[\"comment/56\",[]],[\"name/57\",[46,45.971]],[\"comment/57\",[]],[\"name/58\",[47,45.971]],[\"comment/58\",[]],[\"name/59\",[48,45.971]],[\"comment/59\",[]],[\"name/60\",[49,45.971]],[\"comment/60\",[]],[\"name/61\",[50,45.971]],[\"comment/61\",[]],[\"name/62\",[13,40.094]],[\"comment/62\",[]],[\"name/63\",[51,45.971]],[\"comment/63\",[]],[\"name/64\",[52,51.08]],[\"comment/64\",[]],[\"name/65\",[53,45.971]],[\"comment/65\",[]],[\"name/66\",[54,40.094]],[\"comment/66\",[]],[\"name/67\",[55,51.08]],[\"comment/67\",[]],[\"name/68\",[5,40.094]],[\"comment/68\",[]],[\"name/69\",[6,45.971]],[\"comment/69\",[]],[\"name/70\",[7,45.971]],[\"comment/70\",[]],[\"name/71\",[8,45.971]],[\"comment/71\",[]],[\"name/72\",[41,45.971]],[\"comment/72\",[]],[\"name/73\",[11,32.621]],[\"comment/73\",[]],[\"name/74\",[18,45.971]],[\"comment/74\",[]],[\"name/75\",[19,45.971]],[\"comment/75\",[]],[\"name/76\",[20,45.971]],[\"comment/76\",[]],[\"name/77\",[23,42.607]],[\"comment/77\",[]],[\"name/78\",[25,42.607]],[\"comment/78\",[]],[\"name/79\",[56,51.08]],[\"comment/79\",[]],[\"name/80\",[38,45.971]],[\"comment/80\",[]],[\"name/81\",[43,45.971]],[\"comment/81\",[]],[\"name/82\",[44,45.971]],[\"comment/82\",[]],[\"name/83\",[45,45.971]],[\"comment/83\",[]],[\"name/84\",[46,45.971]],[\"comment/84\",[]],[\"name/85\",[47,45.971]],[\"comment/85\",[]],[\"name/86\",[48,45.971]],[\"comment/86\",[]],[\"name/87\",[49,45.971]],[\"comment/87\",[]],[\"name/88\",[50,45.971]],[\"comment/88\",[]],[\"name/89\",[13,40.094]],[\"comment/89\",[]],[\"name/90\",[53,45.971]],[\"comment/90\",[]],[\"name/91\",[57,51.08]],[\"comment/91\",[]],[\"name/92\",[51,45.971]],[\"comment/92\",[]],[\"name/93\",[58,51.08]],[\"comment/93\",[]],[\"name/94\",[59,51.08]],[\"comment/94\",[]],[\"name/95\",[60,51.08]],[\"comment/95\",[]],[\"name/96\",[29,42.607]],[\"comment/96\",[]],[\"name/97\",[61,45.971]],[\"comment/97\",[]],[\"name/98\",[30,42.607]],[\"comment/98\",[]],[\"name/99\",[31,45.971]],[\"comment/99\",[]],[\"name/100\",[15,38.087]],[\"comment/100\",[]],[\"name/101\",[62,51.08]],[\"comment/101\",[]],[\"name/102\",[63,51.08]],[\"comment/102\",[]],[\"name/103\",[64,51.08]],[\"comment/103\",[]],[\"name/104\",[65,51.08]],[\"comment/104\",[]],[\"name/105\",[66,51.08]],[\"comment/105\",[]],[\"name/106\",[67,51.08]],[\"comment/106\",[]],[\"name/107\",[68,51.08]],[\"comment/107\",[]],[\"name/108\",[11,32.621]],[\"comment/108\",[]],[\"name/109\",[12,36.416]],[\"comment/109\",[]],[\"name/110\",[69,42.607]],[\"comment/110\",[]],[\"name/111\",[70,42.607]],[\"comment/111\",[]],[\"name/112\",[71,42.607]],[\"comment/112\",[]],[\"name/113\",[72,42.607]],[\"comment/113\",[]],[\"name/114\",[73,42.607]],[\"comment/114\",[]],[\"name/115\",[74,51.08]],[\"comment/115\",[]],[\"name/116\",[75,42.607]],[\"comment/116\",[]],[\"name/117\",[76,51.08]],[\"comment/117\",[]],[\"name/118\",[77,51.08]],[\"comment/118\",[]],[\"name/119\",[11,32.621]],[\"comment/119\",[]],[\"name/120\",[78,51.08]],[\"comment/120\",[]],[\"name/121\",[15,38.087]],[\"comment/121\",[]],[\"name/122\",[75,42.607]],[\"comment/122\",[]],[\"name/123\",[12,36.416]],[\"comment/123\",[]],[\"name/124\",[69,42.607]],[\"comment/124\",[]],[\"name/125\",[70,42.607]],[\"comment/125\",[]],[\"name/126\",[71,42.607]],[\"comment/126\",[]],[\"name/127\",[72,42.607]],[\"comment/127\",[]],[\"name/128\",[73,42.607]],[\"comment/128\",[]],[\"name/129\",[79,51.08]],[\"comment/129\",[]],[\"name/130\",[80,45.971]],[\"comment/130\",[]],[\"name/131\",[11,32.621]],[\"comment/131\",[]],[\"name/132\",[34,45.971]],[\"comment/132\",[]],[\"name/133\",[15,38.087]],[\"comment/133\",[]],[\"name/134\",[75,42.607]],[\"comment/134\",[]],[\"name/135\",[12,36.416]],[\"comment/135\",[]],[\"name/136\",[69,42.607]],[\"comment/136\",[]],[\"name/137\",[70,42.607]],[\"comment/137\",[]],[\"name/138\",[71,42.607]],[\"comment/138\",[]],[\"name/139\",[72,42.607]],[\"comment/139\",[]],[\"name/140\",[73,42.607]],[\"comment/140\",[]],[\"name/141\",[81,51.08]],[\"comment/141\",[]],[\"name/142\",[82,51.08]],[\"comment/142\",[]],[\"name/143\",[83,40.094]],[\"comment/143\",[]],[\"name/144\",[54,40.094]],[\"comment/144\",[]],[\"name/145\",[12,36.416]],[\"comment/145\",[]],[\"name/146\",[84,51.08]],[\"comment/146\",[]],[\"name/147\",[11,32.621]],[\"comment/147\",[]],[\"name/148\",[12,36.416]],[\"comment/148\",[]],[\"name/149\",[83,40.094]],[\"comment/149\",[]],[\"name/150\",[22,45.971]],[\"comment/150\",[]],[\"name/151\",[54,40.094]],[\"comment/151\",[]],[\"name/152\",[85,51.08]],[\"comment/152\",[]],[\"name/153\",[86,45.971]],[\"comment/153\",[]],[\"name/154\",[87,51.08]],[\"comment/154\",[]],[\"name/155\",[80,45.971]],[\"comment/155\",[]],[\"name/156\",[88,51.08]],[\"comment/156\",[]],[\"name/157\",[89,51.08]],[\"comment/157\",[]],[\"name/158\",[61,45.971]],[\"comment/158\",[]],[\"name/159\",[90,51.08]],[\"comment/159\",[]],[\"name/160\",[91,51.08]],[\"comment/160\",[]],[\"name/161\",[92,51.08]],[\"comment/161\",[]],[\"name/162\",[93,51.08]],[\"comment/162\",[]],[\"name/163\",[29,42.607]],[\"comment/163\",[]],[\"name/164\",[94,51.08]],[\"comment/164\",[]],[\"name/165\",[95,51.08]],[\"comment/165\",[]],[\"name/166\",[96,51.08]],[\"comment/166\",[]],[\"name/167\",[97,51.08]],[\"comment/167\",[]],[\"name/168\",[98,51.08]],[\"comment/168\",[]],[\"name/169\",[30,42.607]],[\"comment/169\",[]],[\"name/170\",[99,51.08]],[\"comment/170\",[]],[\"name/171\",[100,51.08]],[\"comment/171\",[]],[\"name/172\",[101,51.08]],[\"comment/172\",[]],[\"name/173\",[102,51.08]],[\"comment/173\",[]],[\"name/174\",[103,51.08]],[\"comment/174\",[]],[\"name/175\",[86,45.971]],[\"comment/175\",[]],[\"name/176\",[26,45.971]],[\"comment/176\",[]],[\"name/177\",[104,45.971]],[\"comment/177\",[]],[\"name/178\",[105,45.971]],[\"comment/178\",[]],[\"name/179\",[106,45.971]],[\"comment/179\",[]],[\"name/180\",[107,45.971]],[\"comment/180\",[]],[\"name/181\",[108,51.08]],[\"comment/181\",[]],[\"name/182\",[109,51.08]],[\"comment/182\",[]],[\"name/183\",[110,42.607]],[\"comment/183\",[]],[\"name/184\",[111,45.971]],[\"comment/184\",[]],[\"name/185\",[112,51.08]],[\"comment/185\",[]],[\"name/186\",[113,51.08]],[\"comment/186\",[]],[\"name/187\",[114,51.08]],[\"comment/187\",[]],[\"name/188\",[104,45.971]],[\"comment/188\",[]],[\"name/189\",[105,45.971]],[\"comment/189\",[]],[\"name/190\",[106,45.971]],[\"comment/190\",[]],[\"name/191\",[107,45.971]],[\"comment/191\",[]],[\"name/192\",[115,51.08]],[\"comment/192\",[]],[\"name/193\",[116,51.08]],[\"comment/193\",[]],[\"name/194\",[110,42.607]],[\"comment/194\",[]],[\"name/195\",[117,51.08]],[\"comment/195\",[]],[\"name/196\",[118,51.08]],[\"comment/196\",[]],[\"name/197\",[2,45.971]],[\"comment/197\",[]],[\"name/198\",[3,45.971]],[\"comment/198\",[]],[\"name/199\",[119,42.607]],[\"comment/199\",[]],[\"name/200\",[120,51.08]],[\"comment/200\",[]],[\"name/201\",[119,42.607]],[\"comment/201\",[]],[\"name/202\",[111,45.971]],[\"comment/202\",[]],[\"name/203\",[121,51.08]],[\"comment/203\",[]],[\"name/204\",[122,51.08]],[\"comment/204\",[]],[\"name/205\",[123,51.08]],[\"comment/205\",[]],[\"name/206\",[124,51.08]],[\"comment/206\",[]],[\"name/207\",[125,42.607]],[\"comment/207\",[]],[\"name/208\",[126,45.971]],[\"comment/208\",[]],[\"name/209\",[127,42.607]],[\"comment/209\",[]],[\"name/210\",[128,51.08]],[\"comment/210\",[]],[\"name/211\",[129,51.08]],[\"comment/211\",[]],[\"name/212\",[4,36.416]],[\"comment/212\",[]],[\"name/213\",[127,42.607]],[\"comment/213\",[]],[\"name/214\",[130,51.08]],[\"comment/214\",[]],[\"name/215\",[83,40.094]],[\"comment/215\",[]],[\"name/216\",[131,45.971]],[\"comment/216\",[]],[\"name/217\",[4,36.416]],[\"comment/217\",[]],[\"name/218\",[132,45.971]],[\"comment/218\",[]],[\"name/219\",[4,36.416]],[\"comment/219\",[]],[\"name/220\",[127,42.607]],[\"comment/220\",[]],[\"name/221\",[133,51.08]],[\"comment/221\",[]],[\"name/222\",[134,45.971]],[\"comment/222\",[]],[\"name/223\",[135,51.08]],[\"comment/223\",[]],[\"name/224\",[136,51.08]],[\"comment/224\",[]],[\"name/225\",[131,45.971]],[\"comment/225\",[]],[\"name/226\",[132,45.971]],[\"comment/226\",[]],[\"name/227\",[134,45.971]],[\"comment/227\",[]],[\"name/228\",[137,51.08]],[\"comment/228\",[]],[\"name/229\",[83,40.094]],[\"comment/229\",[]],[\"name/230\",[125,42.607]],[\"comment/230\",[]],[\"name/231\",[119,42.607]],[\"comment/231\",[]],[\"name/232\",[138,51.08]],[\"comment/232\",[]],[\"name/233\",[110,42.607]],[\"comment/233\",[]],[\"name/234\",[139,51.08]],[\"comment/234\",[]],[\"name/235\",[4,36.416]],[\"comment/235\",[]],[\"name/236\",[125,42.607]],[\"comment/236\",[]],[\"name/237\",[126,45.971]],[\"comment/237\",[]],[\"name/238\",[140,51.08]],[\"comment/238\",[]],[\"name/239\",[141,51.08]],[\"comment/239\",[]],[\"name/240\",[54,40.094]],[\"comment/240\",[]],[\"name/241\",[142,51.08]],[\"comment/241\",[]],[\"name/242\",[4,36.416]],[\"comment/242\",[]],[\"name/243\",[143,51.08]],[\"comment/243\",[]],[\"name/244\",[144,51.08]],[\"comment/244\",[]],[\"name/245\",[145,51.08]],[\"comment/245\",[]],[\"name/246\",[146,51.08]],[\"comment/246\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":4,\"name\":{\"4\":{},\"212\":{},\"217\":{},\"219\":{},\"235\":{},\"242\":{}},\"comment\":{}}],[\"abortabledata\",{\"_index\":133,\"name\":{\"221\":{}},\"comment\":{}}],[\"abortidentify\",{\"_index\":36,\"name\":{\"42\":{},\"49\":{}},\"comment\":{}}],[\"addtospawnqueue\",{\"_index\":64,\"name\":{\"103\":{}},\"comment\":{}}],[\"autorestart\",{\"_index\":48,\"name\":{\"59\":{},\"86\":{}},\"comment\":{}}],[\"baseipc\",{\"_index\":68,\"name\":{\"107\":{}},\"comment\":{}}],[\"broadcast\",{\"_index\":62,\"name\":{\"101\":{}},\"comment\":{}}],[\"broadcasteval\",{\"_index\":27,\"name\":{\"31\":{}},\"comment\":{}}],[\"busy\",{\"_index\":58,\"name\":{\"93\":{}},\"comment\":{}}],[\"cachedsession\",{\"_index\":56,\"name\":{\"79\":{}},\"comment\":{}}],[\"cancel_identify\",{\"_index\":102,\"name\":{\"173\":{}},\"comment\":{}}],[\"chunk\",{\"_index\":94,\"name\":{\"164\":{}},\"comment\":{}}],[\"cleanup\",{\"_index\":90,\"name\":{\"159\":{}},\"comment\":{}}],[\"client\",{\"_index\":13,\"name\":{\"13\":{},\"23\":{},\"62\":{},\"89\":{}},\"comment\":{}}],[\"client/shardclient\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"client/shardclientutil\",{\"_index\":16,\"name\":{\"17\":{}},\"comment\":{}}],[\"client_ready\",{\"_index\":115,\"name\":{\"192\":{}},\"comment\":{}}],[\"clientevents\",{\"_index\":97,\"name\":{\"167\":{}},\"comment\":{}}],[\"clientoptions\",{\"_index\":43,\"name\":{\"54\":{},\"81\":{}},\"comment\":{}}],[\"cluster\",{\"_index\":78,\"name\":{\"120\":{}},\"comment\":{}}],[\"clustercount\",{\"_index\":23,\"name\":{\"27\":{},\"52\":{},\"77\":{}},\"comment\":{}}],[\"clusterid\",{\"_index\":5,\"name\":{\"5\":{},\"14\":{},\"26\":{},\"68\":{}},\"comment\":{}}],[\"clustermanager\",{\"_index\":84,\"name\":{\"146\":{}},\"comment\":{}}],[\"clustermanageroptions\",{\"_index\":82,\"name\":{\"142\":{}},\"comment\":{}}],[\"clusters\",{\"_index\":53,\"name\":{\"65\":{},\"90\":{}},\"comment\":{}}],[\"clustersettings\",{\"_index\":44,\"name\":{\"55\":{},\"82\":{}},\"comment\":{}}],[\"concurrency/concurrencyclient\",{\"_index\":32,\"name\":{\"37\":{}},\"comment\":{}}],[\"concurrency/concurrencymanager\",{\"_index\":37,\"name\":{\"43\":{}},\"comment\":{}}],[\"concurrencyclient\",{\"_index\":33,\"name\":{\"38\":{}},\"comment\":{}}],[\"concurrencymanager\",{\"_index\":38,\"name\":{\"44\":{},\"80\":{}},\"comment\":{}}],[\"constructor\",{\"_index\":11,\"name\":{\"11\":{},\"19\":{},\"39\":{},\"45\":{},\"73\":{},\"108\":{},\"119\":{},\"131\":{},\"147\":{}},\"comment\":{}}],[\"content\",{\"_index\":125,\"name\":{\"207\":{},\"230\":{},\"236\":{}},\"comment\":{}}],[\"controller\",{\"_index\":134,\"name\":{\"222\":{},\"227\":{}},\"comment\":{}}],[\"data\",{\"_index\":3,\"name\":{\"3\":{},\"198\":{}},\"comment\":{}}],[\"debug\",{\"_index\":109,\"name\":{\"182\":{}},\"comment\":{}}],[\"delay\",{\"_index\":95,\"name\":{\"165\":{}},\"comment\":{}}],[\"destroy\",{\"_index\":88,\"name\":{\"156\":{}},\"comment\":{}}],[\"destroy_client\",{\"_index\":100,\"name\":{\"171\":{}},\"comment\":{}}],[\"destroyclusterclient\",{\"_index\":65,\"name\":{\"104\":{}},\"comment\":{}}],[\"error\",{\"_index\":111,\"name\":{\"184\":{},\"202\":{}},\"comment\":{}}],[\"eval\",{\"_index\":98,\"name\":{\"168\":{}},\"comment\":{}}],[\"event\",{\"_index\":8,\"name\":{\"8\":{},\"71\":{}},\"comment\":{}}],[\"fetch\",{\"_index\":93,\"name\":{\"162\":{}},\"comment\":{}}],[\"fetchclientvalues\",{\"_index\":28,\"name\":{\"32\":{}},\"comment\":{}}],[\"fetchsessions\",{\"_index\":29,\"name\":{\"33\":{},\"96\":{},\"163\":{}},\"comment\":{}}],[\"flushpromises\",{\"_index\":71,\"name\":{\"112\":{},\"126\":{},\"138\":{}},\"comment\":{}}],[\"handleconcurrency\",{\"_index\":50,\"name\":{\"61\":{},\"88\":{}},\"comment\":{}}],[\"handlemessage\",{\"_index\":75,\"name\":{\"116\":{},\"122\":{},\"134\":{}},\"comment\":{}}],[\"handlepromise\",{\"_index\":74,\"name\":{\"115\":{}},\"comment\":{}}],[\"handlerawresponse\",{\"_index\":72,\"name\":{\"113\":{},\"127\":{},\"139\":{}},\"comment\":{}}],[\"id\",{\"_index\":83,\"name\":{\"143\":{},\"149\":{},\"215\":{},\"229\":{}},\"comment\":{}}],[\"indomitable\",{\"_index\":41,\"name\":{\"50\":{},\"72\":{}},\"comment\":{}}],[\"indomitableoptions\",{\"_index\":42,\"name\":{\"51\":{}},\"comment\":{}}],[\"inspawnqueuecount\",{\"_index\":60,\"name\":{\"95\":{}},\"comment\":{}}],[\"internal\",{\"_index\":119,\"name\":{\"199\":{},\"201\":{},\"231\":{}},\"comment\":{}}],[\"internalabortsignal\",{\"_index\":128,\"name\":{\"210\":{}},\"comment\":{}}],[\"internalerror\",{\"_index\":120,\"name\":{\"200\":{}},\"comment\":{}}],[\"internalevents\",{\"_index\":118,\"name\":{\"196\":{}},\"comment\":{}}],[\"internalpromise\",{\"_index\":136,\"name\":{\"224\":{}},\"comment\":{}}],[\"ipc\",{\"_index\":22,\"name\":{\"25\":{},\"150\":{}},\"comment\":{}}],[\"ipc/baseipc\",{\"_index\":67,\"name\":{\"106\":{}},\"comment\":{}}],[\"ipc/main\",{\"_index\":76,\"name\":{\"117\":{}},\"comment\":{}}],[\"ipc/worker\",{\"_index\":79,\"name\":{\"129\":{}},\"comment\":{}}],[\"ipcid\",{\"_index\":9,\"name\":{\"9\":{}},\"comment\":{}}],[\"ipctimeout\",{\"_index\":45,\"name\":{\"56\":{},\"83\":{}},\"comment\":{}}],[\"isbusy\",{\"_index\":59,\"name\":{\"94\":{}},\"comment\":{}}],[\"libraryevents\",{\"_index\":108,\"name\":{\"181\":{}},\"comment\":{}}],[\"listener\",{\"_index\":129,\"name\":{\"211\":{}},\"comment\":{}}],[\"main\",{\"_index\":77,\"name\":{\"118\":{}},\"comment\":{}}],[\"makeabortablerequest\",{\"_index\":96,\"name\":{\"166\":{}},\"comment\":{}}],[\"manager\",{\"_index\":12,\"name\":{\"12\":{},\"109\":{},\"123\":{},\"135\":{},\"145\":{},\"148\":{}},\"comment\":{}}],[\"manager/clustermanager\",{\"_index\":81,\"name\":{\"141\":{}},\"comment\":{}}],[\"max_concurrency\",{\"_index\":146,\"name\":{\"246\":{}},\"comment\":{}}],[\"message\",{\"_index\":110,\"name\":{\"183\":{},\"194\":{},\"233\":{}},\"comment\":{}}],[\"mode\",{\"_index\":21,\"name\":{\"24\":{}},\"comment\":{}}],[\"name\",{\"_index\":121,\"name\":{\"203\":{}},\"comment\":{}}],[\"off\",{\"_index\":20,\"name\":{\"22\":{},\"76\":{}},\"comment\":{}}],[\"on\",{\"_index\":18,\"name\":{\"20\":{},\"74\":{}},\"comment\":{}}],[\"once\",{\"_index\":19,\"name\":{\"21\":{},\"75\":{}},\"comment\":{}}],[\"op\",{\"_index\":2,\"name\":{\"2\":{},\"197\":{}},\"comment\":{}}],[\"partialinternalevents\",{\"_index\":1,\"name\":{\"1\":{}},\"comment\":{}}],[\"pendingpromises\",{\"_index\":70,\"name\":{\"111\":{},\"125\":{},\"137\":{}},\"comment\":{}}],[\"ping\",{\"_index\":26,\"name\":{\"30\":{},\"176\":{}},\"comment\":{}}],[\"processqueue\",{\"_index\":66,\"name\":{\"105\":{}},\"comment\":{}}],[\"promises\",{\"_index\":69,\"name\":{\"110\":{},\"124\":{},\"136\":{}},\"comment\":{}}],[\"rawipcmessage\",{\"_index\":137,\"name\":{\"228\":{}},\"comment\":{}}],[\"rawipcmessagetype\",{\"_index\":116,\"name\":{\"193\":{}},\"comment\":{}}],[\"ready\",{\"_index\":86,\"name\":{\"153\":{},\"175\":{}},\"comment\":{}}],[\"readyat\",{\"_index\":87,\"name\":{\"154\":{}},\"comment\":{}}],[\"reason\",{\"_index\":122,\"name\":{\"204\":{}},\"comment\":{}}],[\"reconfigure\",{\"_index\":63,\"name\":{\"102\":{}},\"comment\":{}}],[\"reconfigureoptions\",{\"_index\":52,\"name\":{\"64\":{}},\"comment\":{}}],[\"reject\",{\"_index\":132,\"name\":{\"218\":{},\"226\":{}},\"comment\":{}}],[\"remaining\",{\"_index\":144,\"name\":{\"244\":{}},\"comment\":{}}],[\"replayed\",{\"_index\":7,\"name\":{\"7\":{},\"70\":{}},\"comment\":{}}],[\"repliable\",{\"_index\":126,\"name\":{\"208\":{},\"237\":{}},\"comment\":{}}],[\"reply\",{\"_index\":139,\"name\":{\"234\":{}},\"comment\":{}}],[\"request_identify\",{\"_index\":101,\"name\":{\"172\":{}},\"comment\":{}}],[\"reset_after\",{\"_index\":145,\"name\":{\"245\":{}},\"comment\":{}}],[\"resolve\",{\"_index\":131,\"name\":{\"216\":{},\"225\":{}},\"comment\":{}}],[\"respawn\",{\"_index\":89,\"name\":{\"157\":{}},\"comment\":{}}],[\"response\",{\"_index\":117,\"name\":{\"195\":{}},\"comment\":{}}],[\"restart\",{\"_index\":30,\"name\":{\"34\":{},\"98\":{},\"169\":{}},\"comment\":{}}],[\"restart_all\",{\"_index\":99,\"name\":{\"170\":{}},\"comment\":{}}],[\"restartall\",{\"_index\":31,\"name\":{\"35\":{},\"99\":{}},\"comment\":{}}],[\"savepromiseoptions\",{\"_index\":130,\"name\":{\"214\":{}},\"comment\":{}}],[\"send\",{\"_index\":15,\"name\":{\"16\":{},\"36\":{},\"100\":{},\"121\":{},\"133\":{}},\"comment\":{}}],[\"session_info\",{\"_index\":103,\"name\":{\"174\":{}},\"comment\":{}}],[\"session_start_limit\",{\"_index\":142,\"name\":{\"241\":{}},\"comment\":{}}],[\"sessionobject\",{\"_index\":140,\"name\":{\"238\":{}},\"comment\":{}}],[\"shard\",{\"_index\":34,\"name\":{\"40\":{},\"132\":{}},\"comment\":{}}],[\"shard_disconnect\",{\"_index\":107,\"name\":{\"180\":{},\"191\":{}},\"comment\":{}}],[\"shard_ready\",{\"_index\":104,\"name\":{\"177\":{},\"188\":{}},\"comment\":{}}],[\"shard_reconnect\",{\"_index\":105,\"name\":{\"178\":{},\"189\":{}},\"comment\":{}}],[\"shard_resume\",{\"_index\":106,\"name\":{\"179\":{},\"190\":{}},\"comment\":{}}],[\"shardclient\",{\"_index\":10,\"name\":{\"10\":{}},\"comment\":{}}],[\"shardclientutil\",{\"_index\":17,\"name\":{\"18\":{}},\"comment\":{}}],[\"shardcount\",{\"_index\":25,\"name\":{\"29\":{},\"53\":{},\"78\":{}},\"comment\":{}}],[\"shardeventdata\",{\"_index\":55,\"name\":{\"67\":{}},\"comment\":{}}],[\"shardid\",{\"_index\":6,\"name\":{\"6\":{},\"69\":{}},\"comment\":{}}],[\"shardids\",{\"_index\":24,\"name\":{\"28\":{}},\"comment\":{}}],[\"shards\",{\"_index\":54,\"name\":{\"66\":{},\"144\":{},\"151\":{},\"240\":{}},\"comment\":{}}],[\"signal\",{\"_index\":127,\"name\":{\"209\":{},\"213\":{},\"220\":{}},\"comment\":{}}],[\"signals\",{\"_index\":40,\"name\":{\"47\":{}},\"comment\":{}}],[\"spawn\",{\"_index\":61,\"name\":{\"97\":{},\"158\":{}},\"comment\":{}}],[\"spawndelay\",{\"_index\":47,\"name\":{\"58\":{},\"85\":{}},\"comment\":{}}],[\"spawnqueue\",{\"_index\":57,\"name\":{\"91\":{}},\"comment\":{}}],[\"spawntimeout\",{\"_index\":46,\"name\":{\"57\":{},\"84\":{}},\"comment\":{}}],[\"stack\",{\"_index\":123,\"name\":{\"205\":{}},\"comment\":{}}],[\"start\",{\"_index\":14,\"name\":{\"15\":{}},\"comment\":{}}],[\"started\",{\"_index\":85,\"name\":{\"152\":{}},\"comment\":{}}],[\"throttler\",{\"_index\":39,\"name\":{\"46\":{}},\"comment\":{}}],[\"timeout\",{\"_index\":135,\"name\":{\"223\":{}},\"comment\":{}}],[\"token\",{\"_index\":51,\"name\":{\"63\":{},\"92\":{}},\"comment\":{}}],[\"total\",{\"_index\":143,\"name\":{\"243\":{}},\"comment\":{}}],[\"transportable\",{\"_index\":124,\"name\":{\"206\":{}},\"comment\":{}}],[\"type\",{\"_index\":138,\"name\":{\"232\":{}},\"comment\":{}}],[\"url\",{\"_index\":141,\"name\":{\"239\":{}},\"comment\":{}}],[\"util\",{\"_index\":92,\"name\":{\"161\":{}},\"comment\":{}}],[\"wait\",{\"_index\":91,\"name\":{\"160\":{}},\"comment\":{}}],[\"waitforidentify\",{\"_index\":35,\"name\":{\"41\":{},\"48\":{}},\"comment\":{}}],[\"waitforpromise\",{\"_index\":73,\"name\":{\"114\":{},\"128\":{},\"140\":{}},\"comment\":{}}],[\"waitforready\",{\"_index\":49,\"name\":{\"60\":{},\"87\":{}},\"comment\":{}}],[\"worker\",{\"_index\":80,\"name\":{\"130\":{},\"155\":{}},\"comment\":{}}],[\"worker_exit\",{\"_index\":114,\"name\":{\"187\":{}},\"comment\":{}}],[\"worker_fork\",{\"_index\":112,\"name\":{\"185\":{}},\"comment\":{}}],[\"worker_ready\",{\"_index\":113,\"name\":{\"186\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,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"; \ No newline at end of file diff --git a/docs/assets/style.css b/docs/assets/style.css index 18b4f8f..778b949 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -11,6 +11,7 @@ --light-color-text-aside: #6e6e6e; --light-color-link: #1f70c2; + --light-color-ts-keyword: #056bd6; --light-color-ts-project: #b111c9; --light-color-ts-module: var(--light-color-ts-project); --light-color-ts-namespace: var(--light-color-ts-project); @@ -28,11 +29,10 @@ --light-color-ts-constructor-signature: var(--light-color-ts-constructor); --light-color-ts-parameter: var(--light-color-ts-variable); /* type literal not included as links will never be generated to it */ - --light-color-ts-type-parameter: var(--light-color-ts-type-alias); + --light-color-ts-type-parameter: #a55c0e; --light-color-ts-accessor: var(--light-color-ts-property); --light-color-ts-get-signature: var(--light-color-ts-accessor); --light-color-ts-set-signature: var(--light-color-ts-accessor); - /* object literal not included as it is not used and will be removed in 0.25 */ --light-color-ts-type-alias: #d51270; /* reference not included as links will be colored with the kind that it points to */ @@ -51,6 +51,7 @@ --dark-color-text-aside: #dddddd; --dark-color-link: #00aff4; + --dark-color-ts-keyword: #3399ff; --dark-color-ts-project: #e358ff; --dark-color-ts-module: var(--dark-color-ts-project); --dark-color-ts-namespace: var(--dark-color-ts-project); @@ -68,11 +69,10 @@ --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); --dark-color-ts-parameter: var(--dark-color-ts-variable); /* type literal not included as links will never be generated to it */ - --dark-color-ts-type-parameter: var(--dark-color-ts-type-alias); + --dark-color-ts-type-parameter: #e07d13; --dark-color-ts-accessor: var(--dark-color-ts-property); --dark-color-ts-get-signature: var(--dark-color-ts-accessor); --dark-color-ts-set-signature: var(--dark-color-ts-accessor); - /* object literal not included as it is not used and will be removed in 0.25 */ --dark-color-ts-type-alias: #ff6492; /* reference not included as links will be colored with the kind that it points to */ @@ -93,6 +93,7 @@ --color-text-aside: var(--light-color-text-aside); --color-link: var(--light-color-link); + --color-ts-keyword: var(--light-color-ts-keyword); --color-ts-module: var(--light-color-ts-module); --color-ts-namespace: var(--light-color-ts-namespace); --color-ts-enum: var(--light-color-ts-enum); @@ -134,6 +135,7 @@ --color-text-aside: var(--dark-color-text-aside); --color-link: var(--dark-color-link); + --color-ts-keyword: var(--dark-color-ts-keyword); --color-ts-module: var(--dark-color-ts-module); --color-ts-namespace: var(--dark-color-ts-namespace); --color-ts-enum: var(--dark-color-ts-enum); @@ -182,6 +184,7 @@ body { --color-text-aside: var(--light-color-text-aside); --color-link: var(--light-color-link); + --color-ts-keyword: var(--light-color-ts-keyword); --color-ts-module: var(--light-color-ts-module); --color-ts-namespace: var(--light-color-ts-namespace); --color-ts-enum: var(--light-color-ts-enum); @@ -221,6 +224,7 @@ body { --color-text-aside: var(--dark-color-text-aside); --color-link: var(--dark-color-link); + --color-ts-keyword: var(--dark-color-ts-keyword); --color-ts-module: var(--dark-color-ts-module); --color-ts-namespace: var(--dark-color-ts-namespace); --color-ts-enum: var(--dark-color-ts-enum); @@ -262,12 +266,12 @@ h6 { line-height: 1.2; } -h1 > a, -h2 > a, -h3 > a, -h4 > a, -h5 > a, -h6 > a { +h1 > a:not(.link), +h2 > a:not(.link), +h3 > a:not(.link), +h4 > a:not(.link), +h5 > a:not(.link), +h6 > a:not(.link) { text-decoration: none; color: var(--color-text); } @@ -323,17 +327,14 @@ dd { } /* Footer */ -.tsd-generator { +footer { border-top: 1px solid var(--color-accent); padding-top: 1rem; padding-bottom: 1rem; max-height: 3.5rem; } - -.tsd-generator > p { - margin-top: 0; - margin-bottom: 0; - padding: 0 1rem; +.tsd-generator { + margin: 0 1em; } .container-main { @@ -401,7 +402,8 @@ dd { } body { background: var(--color-background); - font-family: "Segoe UI", sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", + Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; color: var(--color-text); } @@ -468,13 +470,12 @@ blockquote { padding: 0 0 0 20px; margin: 0; } -.tsd-typography h4, .tsd-typography .tsd-index-panel h3, .tsd-index-panel .tsd-typography h3, +.tsd-typography h4, .tsd-typography h5, .tsd-typography h6 { font-size: 1em; - margin: 0; } .tsd-typography h5, .tsd-typography h6 { @@ -485,6 +486,19 @@ blockquote { .tsd-typography ol { margin: 1em 0; } +.tsd-typography table { + border-collapse: collapse; + border: none; +} +.tsd-typography td, +.tsd-typography th { + padding: 6px 13px; + border: 1px solid var(--color-accent); +} +.tsd-typography thead, +.tsd-typography tr:nth-child(even) { + background-color: var(--color-background-secondary); +} .tsd-breadcrumb { margin: 0; @@ -633,6 +647,28 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { font-weight: bold; } +.tsd-full-hierarchy:not(:last-child) { + margin-bottom: 1em; + padding-bottom: 1em; + border-bottom: 1px solid var(--color-accent); +} +.tsd-full-hierarchy, +.tsd-full-hierarchy ul { + list-style: none; + margin: 0; + padding: 0; +} +.tsd-full-hierarchy ul { + padding-left: 1.5rem; +} +.tsd-full-hierarchy a { + padding: 0.25rem 0 !important; + font-size: 1rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} + .tsd-panel-group.tsd-index-group { margin-bottom: 0; } @@ -698,12 +734,15 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { } .tsd-navigation > a, .tsd-navigation .tsd-accordion-summary { - width: calc(100% - 0.5rem); + width: calc(100% - 0.25rem); + display: flex; + align-items: center; } .tsd-navigation a, .tsd-navigation summary > span, .tsd-page-navigation a { - display: inline-flex; + display: flex; + width: calc(100% - 0.25rem); align-items: center; padding: 0.25rem; color: var(--color-text); @@ -743,11 +782,6 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { margin-left: -1.5rem; } -.tsd-nested-navigation > li > a, -.tsd-nested-navigation > li > span { - width: calc(100% - 1.75rem - 0.5rem); -} - .tsd-page-navigation ul { padding-left: 1.75rem; } @@ -900,8 +934,9 @@ a.tsd-index-link { box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); } #tsd-search .results li { - padding: 0 10px; background-color: var(--color-background); + line-height: initial; + padding: 4px; } #tsd-search .results li:nth-child(even) { background-color: var(--color-background-secondary); @@ -909,12 +944,15 @@ a.tsd-index-link { #tsd-search .results li.state { display: none; } -#tsd-search .results li.current, -#tsd-search .results li:hover { +#tsd-search .results li.current:not(.no-results), +#tsd-search .results li:hover:not(.no-results) { background-color: var(--color-accent); } #tsd-search .results a { - display: block; + display: flex; + align-items: center; + padding: 0.25rem; + box-sizing: border-box; } #tsd-search .results a:before { top: 10px; @@ -970,6 +1008,11 @@ a.tsd-index-link { overflow-x: auto; } +.tsd-signature-keyword { + color: var(--color-ts-keyword); + font-weight: normal; +} + .tsd-signature-symbol { color: var(--color-text-aside); font-weight: normal; @@ -1070,7 +1113,9 @@ ul.tsd-type-parameter-list h5 { overflow: hidden; opacity: 0.8; height: 40px; - transition: opacity 0.1s, background-color 0.2s; + transition: + opacity 0.1s, + background-color 0.2s; vertical-align: bottom; cursor: pointer; } @@ -1122,7 +1167,7 @@ img { } .deprecated { - text-decoration: line-through; + text-decoration: line-through !important; } .warning { diff --git a/docs/classes/Indomitable.Indomitable.html b/docs/classes/Indomitable.Indomitable.html index 92a738c..810aef1 100644 --- a/docs/classes/Indomitable.Indomitable.html +++ b/docs/classes/Indomitable.Indomitable.html @@ -1,237 +1,68 @@ -Indomitable | indomitable
-
- -
-
-
-
- -

Class Indomitable

-
-

The main Indomitable class, exposing all functionality.

-
-
-
-

Hierarchy

-
    -
  • EventEmitter -
      -
    • Indomitable
-
-
-
- -
-
-

Constructors

-
- -
-
-

Properties

-
- -
autoRestart: boolean
-
- -
busy: boolean
-
- -
cachedSession?: SessionObject
-
- -
client: typeof Client
-
- -
clientOptions: ClientOptions
-
- -
clusterCount: number | "auto"
-
- -
clusterSettings: ClusterSettings
-
- -
clusters: Map<number, ClusterManager>
-
- -
concurrencyManager?: ConcurrencyManager
-
- -
handleConcurrency: boolean
-
- -
ipcTimeout: number
-
- -
shardCount: number | "auto"
-
- -
spawnDelay: number
-
- -
spawnQueue: ClusterManager[]
-
- -
spawnTimeout: number
-
- -
token: string
-
- -
waitForReady: boolean
-
- -
captureRejectionSymbol: typeof captureRejectionSymbol
-

Value: Symbol.for('nodejs.rejection')

+Indomitable | indomitable

The main Indomitable class, exposing all functionality.

+

Hierarchy

  • EventEmitter
    • Indomitable

Constructors

Properties

autoRestart: boolean
busy: boolean
cachedSession?: SessionObject
client: typeof Client
clientOptions: ClientOptions
clusterCount: number | "auto"
clusterSettings: ClusterSettings
clusters: Map<number, ClusterManager>
concurrencyManager?: ConcurrencyManager
handleConcurrency: boolean
ipcTimeout: number
shardCount: number | "auto"
spawnDelay: number
spawnQueue: ClusterManager[]
spawnTimeout: number
token: string
waitForReady: boolean
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

See how to write a custom rejection handler.

-
-
-

Since

v13.4.0, v12.16.0

-
-
- -
captureRejections: boolean
-

Value: boolean

+

Since

v13.4.0, v12.16.0

+
captureRejections: boolean

Value: boolean

Change the default captureRejections option on all new EventEmitter objects.

-
-
-

Since

v13.4.0, v12.16.0

-
-
- -
defaultMaxListeners: number
-

By default, a maximum of 10 listeners can be registered for any single +

Since

v13.4.0, v12.16.0

+
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single event. This limit can be changed for individual EventEmitter instances using the emitter.setMaxListeners(n) method. To change the default for allEventEmitter instances, the events.defaultMaxListenersproperty can be used. If this value is not a positive number, a RangeErroris thrown.

@@ -252,938 +83,81 @@
-
-

Since

v0.11.2

-
-
- -
errorMonitor: typeof errorMonitor
-

This symbol shall be used to install a listener for only monitoring 'error'events. Listeners installed using this symbol are called before the regular'error' listeners are called.

+

Since

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error'events. Listeners installed using this symbol are called before the regular'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an'error' event is emitted. Therefore, the process will still crash if no regular 'error' listener is installed.

-
-
-

Since

v13.6.0, v12.17.0

-
-
-

Accessors

-
- -
    -
  • get inSpawnQueueCount(): number
  • -
  • -

    Gets how many clusters are waiting to be spawned

    -
    -

    Returns number

    Number of clusters in queue

    - -
-
- -
    -
  • get isBusy(): boolean
  • -
  • -

    Checks the internal private flag if Indomitable is busy

    -
    -

    Returns boolean

    Number of clusters in queue

    - -
-
-

Methods

-
- -
    - -
  • -

    Alias for emitter.on(eventName, listener).

    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: string | symbol
    • -
    • -
      listener: ((...args) => void)
      -
        -
      • -
          -
        • (...args): void
        • -
        • -
          -

          Parameters

          -
            -
          • -
            Rest ...args: any[]
          -

          Returns void

    -

    Returns Indomitable

    -
    -

    Since

    v0.1.26

    -
-
- -
    - -
  • Internal -

    Adds a cluster to spawn queue

    -
    -
    -

    Parameters

    -
    -

    Returns Promise<void>

    -
-
- -
    - -
  • -

    Sends a message on all clusters

    -
    -
    -

    Parameters

    -
    -

    Returns Promise<undefined | unknown[]>

    An array of promise that resolves to undefined or an unknown value depending on how you reply to it

    - -
-
- -
    - -
  • Internal -

    Destroys the client on a cluster

    -
    -
    -

    Parameters

    -
      -
    • -
      id: number
    -

    Returns Promise<void>

    -
-
- -
    - -
  • -

    Synchronously calls each of the listeners registered for the event namedeventName, in the order they were registered, passing the supplied arguments +

    Since

    v13.6.0, v12.17.0

    +

Accessors

  • get inSpawnQueueCount(): number
  • Gets how many clusters are waiting to be spawned

    +

    Returns number

    Number of clusters in queue

    +
  • get isBusy(): boolean
  • Checks the internal private flag if Indomitable is busy

    +

    Returns boolean

    Number of clusters in queue

    +

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest ...args: AnyRest

    Returns void

  • Alias for emitter.on(eventName, listener).

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v0.1.26

    +
  • Internal

    Adds a cluster to spawn queue

    +

    Parameters

    Returns Promise<void>

  • Sends a message on all clusters

    +

    Parameters

    Returns Promise<undefined | unknown[]>

    An array of promise that resolves to undefined or an unknown value depending on how you reply to it

    +
  • Internal

    Destroys the client on a cluster

    +

    Parameters

    • id: number

    Returns Promise<void>

  • Synchronously calls each of the listeners registered for the event namedeventName, in the order they were registered, passing the supplied arguments to each.

    Returns true if the event had listeners, false otherwise.

    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener
    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: string | symbol
    • -
    • -
      Rest ...args: any[]
    -

    Returns boolean

    -
    -

    Since

    v0.1.26

    -
-
- -
    - -
  • -

    Returns an array listing the events for which the emitter has registered +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • Rest ...args: AnyRest

    Returns boolean

    Since

    v0.1.26

    +
  • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ]
    -
    -

    Returns (string | symbol)[]

    -
    -

    Since

    v6.0.0

    -
-
- -
    - -
  • -

    Gets the current session info of the bot token Indomitable currently handles

    -
    -
    -

    Parameters

    -
      -
    • -
      force: boolean = false
    -

    Returns Promise<SessionObject>

    Session Info

    - -
-
- -
    - -
  • -

    Returns the current max listener value for the EventEmitter which is either +

    Returns (string | symbol)[]

    Since

    v6.0.0

    +
  • Returns the current max listener value for the EventEmitter which is either set by emitter.setMaxListeners(n) or defaults to defaultMaxListeners.

    -
    -

    Returns number

    -
    -

    Since

    v1.0.0

    -
-
- -
    - -
  • -

    Returns the number of listeners listening for the event named eventName. +

    Returns number

    Since

    v1.0.0

    +
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: string | symbol
      -

      The name of the event being listened for

      -
      -
    • -
    • -
      Optional listener: Function
      -

      The event handler function

      -
      -
    -

    Returns number

    -
    -

    Since

    v3.2.0

    -
-
- -
    - -
  • -

    Returns a copy of the array of listeners for the event named eventName.

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      +
    • Optional listener: Function

      The event handler function

      +

    Returns number

    Since

    v3.2.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    server.on('connection', (stream) => {
    console.log('someone connected!');
    });
    console.log(util.inspect(server.listeners('connection')));
    // Prints: [ [Function] ]
    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: string | symbol
    -

    Returns Function[]

    -
    -

    Since

    v0.1.26

    -
-
- -
-
- -
-
- -
    - -
  • -

    Adds the listener function to the beginning of the listeners array for the +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

    Returns Function[]

    Since

    v0.1.26

    +
  • Parameters

    • event: "debug"
    • listener: ((message) => void)
        • (message): void
        • Parameters

          • message: string

          Returns void

    Returns this

  • Parameters

    • event: "message"
    • listener: ((message) => void)
        • (message): void
        • Parameters

          • message: unknown

          Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: ((error) => void)
        • (error): void
        • Parameters

          • error: unknown

          Returns void

    Returns this

  • Parameters

    • event: "workerFork"
    • listener: ((cluster) => void)

    Returns this

  • Parameters

    • event: "workerReady"
    • listener: ((cluster) => void)

    Returns this

  • Parameters

    • event: "workerExit"
    • listener: ((code, signal, cluster) => void)
        • (code, signal, cluster): void
        • Parameters

          Returns void

    Returns this

  • Parameters

    • event: "shardReady"
    • listener: ((event) => void)

    Returns this

  • Parameters

    • event: "shardReconnect"
    • listener: ((event) => void)

    Returns this

  • Parameters

    • event: "shardResume"
    • listener: ((event) => void)

    Returns this

  • Parameters

    • event: "shardDisconnect"
    • listener: ((event) => void)

    Returns this

  • Parameters

    • event: "clientReady"
    • listener: ((event) => void)

    Returns this

  • Parameters

    • event: "raw"
    • listener: ((event) => void)
        • (event): void
        • Parameters

          • event: unknown

          Returns void

    Returns this

  • Parameters

    • event: "debug"
    • listener: ((message) => void)
        • (message): void
        • Parameters

          • message: string

          Returns void

    Returns this

  • Parameters

    • event: "message"
    • listener: ((message) => void)
        • (message): void
        • Parameters

          • message: unknown

          Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: ((error) => void)
        • (error): void
        • Parameters

          • error: unknown

          Returns void

    Returns this

  • Parameters

    • event: "workerFork"
    • listener: ((cluster) => void)

    Returns this

  • Parameters

    • event: "workerReady"
    • listener: ((cluster) => void)

    Returns this

  • Parameters

    • event: "workerExit"
    • listener: ((code, signal, cluster) => void)
        • (code, signal, cluster): void
        • Parameters

          Returns void

    Returns this

  • Parameters

    • event: "shardReady"
    • listener: ((event) => void)

    Returns this

  • Parameters

    • event: "shardReconnect"
    • listener: ((event) => void)

    Returns this

  • Parameters

    • event: "shardResume"
    • listener: ((event) => void)

    Returns this

  • Parameters

    • event: "shardDisconnect"
    • listener: ((event) => void)

    Returns this

  • Parameters

    • event: "clientReady"
    • listener: ((event) => void)

    Returns this

  • Parameters

    • event: "raw"
    • listener: ((event) => void)
        • (event): void
        • Parameters

          • event: unknown

          Returns void

    Returns this

  • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventNameand listener will result in the listener being added, and called, multiple times.

    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    });

    Returns a reference to the EventEmitter, so that calls can be chained.

    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: string | symbol
      -

      The name of the event.

      -
      -
    • -
    • -
      listener: ((...args) => void)
      -

      The callback function

      -
      -
      -
        -
      • -
          -
        • (...args): void
        • -
        • -
          -

          Parameters

          -
            -
          • -
            Rest ...args: any[]
          -

          Returns void

    -

    Returns Indomitable

    -
    -

    Since

    v6.0.0

    -
-
- -
    - -
  • -

    Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event.

      +
    • listener: ((...args) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    });

    Returns a reference to the EventEmitter, so that calls can be chained.

    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: string | symbol
      -

      The name of the event.

      -
      -
    • -
    • -
      listener: ((...args) => void)
      -

      The callback function

      -
      -
      -
        -
      • -
          -
        • (...args): void
        • -
        • -
          -

          Parameters

          -
            -
          • -
            Rest ...args: any[]
          -

          Returns void

    -

    Returns Indomitable

    -
    -

    Since

    v6.0.0

    -
-
- -
    - -
  • Internal -

    Processes the cluster queue

    -
    -

    Returns Promise<void>

    -
-
- -
    - -
  • -

    Returns a copy of the array of listeners for the event named eventName, +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event.

      +
    • listener: ((...args) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v6.0.0

    +
  • Internal

    Processes the cluster queue

    +

    Returns Promise<void>

  • Returns a copy of the array of listeners for the event named eventName, including any wrappers (such as those created by .once()).

    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log');
    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: string | symbol
    -

    Returns Function[]

    -
    -

    Since

    v9.4.0

    -
-
- -
    - -
  • -

    Reconfigures to launch more shards / clusters without killing the existing processes if possible to avoid big downtimes

    -
    -
    -

    Parameters

    -
    -

    Returns Promise<void>

    A promise that resolves to void

    - -
    -

    Remarks

    Never execute restart() or restartAll() during this process or else you will double restart that cluster / all clusters

    -
-
- -
    - -
  • -

    Removes all listeners, or those of the specified eventName.

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

    Returns Function[]

    Since

    v9.4.0

    +
  • Reconfigures to launch more shards / clusters without killing the existing processes if possible to avoid big downtimes

    +

    Parameters

    Returns Promise<void>

    A promise that resolves to void

    +

    Remarks

    Never execute restart() or restartAll() during this process or else you will double restart that cluster / all clusters

    +
  • Removes all listeners, or those of the specified eventName.

    It is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).

    Returns a reference to the EventEmitter, so that calls can be chained.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional event: string | symbol
    -

    Returns Indomitable

    -
    -

    Since

    v0.1.26

    -
-
- -
    - -
  • -

    Removes the specified listener from the listener array for the event namedeventName.

    +

    Parameters

    • Optional eventName: string | symbol

    Returns this

    Since

    v0.1.26

    +
-
- -
    - -
  • -

    Restart specified cluster if this instance is the primary process

    -
    -
    -

    Parameters

    -
      -
    • -
      clusterId: number
      -

      Id of cluster to restart

      -
      -
    -

    Returns Promise<void>

    A promise that resolves to void

    - -
-
- -
    - -
  • -

    Restart all clusters if this instance is the primary process

    -
    -

    Returns Promise<void>

    A promise that resolves to void

    - -
-
- -
    - -
  • -

    Sends a message to a specific cluster

    -
    -
    -

    Parameters

    -
    -

    Returns Promise<unknown>

    A promise that resolves to undefined or an unknown value depending on how you reply to it

    - -
-
- -
    - -
  • -

    By default EventEmitters will print a warning if more than 10 listeners are +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v0.1.26

    +
  • Restart specified cluster if this instance is the primary process

    +

    Parameters

    • clusterId: number

      Id of cluster to restart

      +

    Returns Promise<void>

    A promise that resolves to void

    +
  • Restart all clusters if this instance is the primary process

    +

    Returns Promise<void>

    A promise that resolves to void

    +
  • Sends a message to a specific cluster

    +

    Parameters

    Returns Promise<unknown>

    A promise that resolves to undefined or an unknown value depending on how you reply to it

    +
  • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set toInfinity (or 0) to indicate an unlimited number of listeners.

    Returns a reference to the EventEmitter, so that calls can be chained.

    -
    -
    -

    Parameters

    -
      -
    • -
      n: number
    -

    Returns Indomitable

    -
    -

    Since

    v0.3.5

    -
-
- -
    - -
  • -

    Spawn a new ShardClient if this instance is a child process, or start a new cluster and IPC server if this instance is the primary process

    -
    -

    Returns Promise<void>

    A promise that resolves to void

    - -
-
- -
    - -
  • -

    Returns a copy of the array of listeners for the event named eventName.

    +

    Parameters

    • n: number

    Returns this

    Since

    v0.3.5

    +
  • Spawn a new ShardClient if this instance is a child process, or start a new cluster and IPC server if this instance is the primary process

    +

    Returns Promise<void>

    A promise that resolves to void

    +
  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    +

    Parameters

    • signal: AbortSignal
    • resource: ((event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    Since

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    For EventEmitters this behaves exactly the same as calling .listeners on the emitter.

    For EventTargets this is the only way to get the event listeners for the event target. This is useful for debugging and diagnostic purposes.

    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    }
    -
    -
    -

    Parameters

    -
      -
    • -
      emitter: EventEmitter | _DOMEventTarget
    • -
    • -
      name: string | symbol
    -

    Returns Function[]

    -
    -

    Since

    v15.2.0, v14.17.0

    -
-
- -
    - -
  • -

    A class method that returns the number of listeners for the given eventNameregistered on the given emitter.

    +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | _DOMEventTarget
    • name: string | symbol

    Returns Function[]

    Since

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | _DOMEventTarget

    Returns number

    Since

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventNameregistered on the given emitter.

    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2
    -
    -
    -

    Parameters

    -
      -
    • -
      emitter: EventEmitter
      -

      The emitter to query

      -
      -
    • -
    • -
      eventName: string | symbol
      -

      The event name

      -
      -
    -

    Returns number

    -
    -

    Since

    v0.9.12

    - +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    Since

    v0.9.12

    Deprecated

    Since v3.2.0 - Use listenerCount instead.

    -
-
- -
    - -
  • -
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here

    Returns an AsyncIterator that iterates eventName events. It will throw if the EventEmitter emits 'error'. It removes all listeners when @@ -1386,51 +243,10 @@

    -
    -

    Parameters

    -
      -
    • -
      emitter: EventEmitter
    • -
    • -
      eventName: string
      -

      The name of the event being listened for

      -
      -
    • -
    • -
      Optional options: StaticEventEmitterOptions
    -

    Returns AsyncIterableIterator<any>

    that iterates eventName events emitted by the emitter

    - -
    -

    Since

    v13.6.0, v12.16.0

    -
  • - -
  • -
    -

    Type Parameters

    -
      -
    • -

      E extends __module

    • -
    • -

      K extends keyof ClientEvents

    -
    -

    Parameters

    -
      -
    • -
      eventEmitter: E
    • -
    • -
      eventName: E extends Client<boolean>
          ? K
          : string
    -

    Returns AsyncIterableIterator<E extends Client<boolean>
        ? ClientEvents[K]
        : any>

-
- -
    - -
  • -

    Creates a Promise that is fulfilled when the EventEmitter emits the given +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string

      The name of the event being listened for

      +
    • Optional options: StaticEventEmitterOptions

    Returns AsyncIterableIterator<any>

    that iterates eventName events emitted by the emitter

    +

    Since

    v13.6.0, v12.16.0

    +
  • Type Parameters

    • Emitter extends __module
    • Events extends keyof ClientEvents

    Parameters

    Returns AsyncIterableIterator<Emitter extends Client<boolean>
        ? ClientEvents[Events]
        : any>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given event or that is rejected if the EventEmitter emits 'error' while waiting. The Promise will resolve with an array of all the arguments emitted to the given event.

    @@ -1446,469 +262,21 @@
    -
    -

    Parameters

    -
      -
    • -
      emitter: _NodeEventTarget
    • -
    • -
      eventName: string | symbol
    • -
    • -
      Optional options: StaticEventEmitterOptions
    -

    Returns Promise<any[]>

    -
    -

    Since

    v11.13.0, v10.16.0

    -
  • - -
  • -
    -

    Parameters

    -
      -
    • -
      emitter: _DOMEventTarget
    • -
    • -
      eventName: string
    • -
    • -
      Optional options: StaticEventEmitterOptions
    -

    Returns Promise<any[]>

  • - -
  • -
    -

    Type Parameters

    -
      -
    • -

      E extends __module

    • -
    • -

      K extends keyof ClientEvents

    -
    -

    Parameters

    -
      -
    • -
      eventEmitter: E
    • -
    • -
      eventName: E extends Client<boolean>
          ? K
          : string
    -

    Returns Promise<E extends Client<boolean>
        ? ClientEvents[K]
        : any[]>

-
- -
    - -
  • -
    import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optional options: StaticEventEmitterOptions

    Returns Promise<any[]>

    Since

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: _DOMEventTarget
    • eventName: string
    • Optional options: StaticEventEmitterOptions

    Returns Promise<any[]>

  • Type Parameters

    • Emitter extends __module
    • Event extends keyof ClientEvents

    Parameters

    Returns Promise<Emitter extends Client<boolean>
        ? ClientEvents[Event]
        : any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter);
    -
    -
    -

    Parameters

    -
      -
    • -
      Optional n: number
      -

      A non-negative number. The maximum number of listeners per EventTarget event.

      -
      -
    • -
    • -
      Rest ...eventTargets: (EventEmitter | _DOMEventTarget)[]
    -

    Returns void

    -
    -

    Since

    v15.4.0

    -
-
-

Events

-
- -
    - -
  • -

    Emitted when data useful for debugging is produced

    -
    -
    -

    Parameters

    -
      -
    • -
      event: "debug"
    • -
    • -
      listener: ((message, data?) => void)
      -
        -
      • -
          -
        • (message, data?): void
        • -
        • -
          -

          Parameters

          -
            -
          • -
            message: string
          • -
          • -
            Optional data: unknown
          -

          Returns void

    -

    Returns Indomitable

    -
  • - -
  • -

    Emitted when an IPC message is received

    -
    -
    -

    Parameters

    -
      -
    • -
      event: "message"
    • -
    • -
      listener: ((message) => void)
      -
        -
      • -
          -
        • (message): void
        • -
        • -
          -

          Parameters

          -
            -
          • -
            message: unknown
          -

          Returns void

    -

    Returns Indomitable

    -
  • - -
  • -

    Emitted when an error occurs

    -
    -
    -

    Parameters

    -
      -
    • -
      event: "error"
    • -
    • -
      listener: ((error) => void)
      -
        -
      • -
          -
        • (error): void
        • -
        • -
          -

          Parameters

          -
            -
          • -
            error: unknown
          -

          Returns void

    -

    Returns Indomitable

    -
  • - -
  • -

    Emitted when a new worker process is forked

    -
    -
    -

    Parameters

    -
      -
    • -
      event: "workerFork"
    • -
    • -
      listener: ((cluster) => void)
      -
        -
      • -
          -
        • (cluster): void
        • -
        • -
          -

          Parameters

          -
          -

          Returns void

    -

    Returns Indomitable

    -
  • - -
  • -

    Emitted when a worker process is ready

    -
    -
    -

    Parameters

    -
      -
    • -
      event: "workerReady"
    • -
    • -
      listener: ((cluster) => void)
      -
        -
      • -
          -
        • (cluster): void
        • -
        • -
          -

          Parameters

          -
          -

          Returns void

    -

    Returns Indomitable

    -
  • - -
  • -

    Emitted when a worker process exits

    -
    -
    -

    Parameters

    -
      -
    • -
      event: "workerExit"
    • -
    • -
      listener: ((code, signal, cluster) => void)
      -
        -
      • -
          -
        • (code, signal, cluster): void
        • -
        • -
          -

          Parameters

          -
            -
          • -
            code: null | number
          • -
          • -
            signal: null | string
          • -
          • -
            cluster: ClusterManager
          -

          Returns void

    -

    Returns Indomitable

    -
  • - -
  • -

    Emitted when a Discord.js shard is ready

    -
    -
    -

    Parameters

    -
      -
    • -
      event: "shardReady"
    • -
    • -
      listener: ((event) => void)
      -
        -
      • -
          -
        • (event): void
        • -
        • -
          -

          Parameters

          -
          -

          Returns void

    -

    Returns Indomitable

    -
  • - -
  • -

    Emitted when a Discord.js shard is reconnecting

    -
    -
    -

    Parameters

    -
      -
    • -
      event: "shardReconnect"
    • -
    • -
      listener: ((event) => void)
      -
        -
      • -
          -
        • (event): void
        • -
        • -
          -

          Parameters

          -
          -

          Returns void

    -

    Returns Indomitable

    -
  • - -
  • -

    Emitted when a Discord.js shard resumes

    -
    -
    -

    Parameters

    -
      -
    • -
      event: "shardResume"
    • -
    • -
      listener: ((event) => void)
      -
        -
      • -
          -
        • (event): void
        • -
        • -
          -

          Parameters

          -
          -

          Returns void

    -

    Returns Indomitable

    -
  • - -
  • -

    Emitted when a Discord.js shard disconnects

    -
    -
    -

    Parameters

    -
      -
    • -
      event: "shardDisconnect"
    • -
    • -
      listener: ((event) => void)
      -
        -
      • -
          -
        • (event): void
        • -
        • -
          -

          Parameters

          -
          -

          Returns void

    -

    Returns Indomitable

    -
  • - -
  • -

    Emitted when a Discord.js client is ready

    -
    -
    -

    Parameters

    -
      -
    • -
      event: "clientReady"
    • -
    • -
      listener: ((event) => void)
      -
        -
      • -
          -
        • (event): void
        • -
        • -
          -

          Parameters

          -
          -

          Returns void

    -

    Returns Indomitable

    -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file +

Parameters

  • Optional n: number

    A non-negative number. The maximum number of listeners per EventTarget event.

    +
  • Rest ...eventTargets: (EventEmitter<DefaultEventMap> | _DOMEventTarget)[]

Returns void

Since

v15.4.0

+

Events

  • Emitted when data useful for debugging is produced

    +

    Parameters

    • event: "debug"
    • listener: ((message) => void)
        • (message): void
        • Parameters

          • message: string

          Returns void

    Returns this

  • Emitted when an IPC message is received

    +

    Parameters

    • event: "message"
    • listener: ((message) => void)
        • (message): void
        • Parameters

          • message: unknown

          Returns void

    Returns this

  • Emitted when an error occurs

    +

    Parameters

    • event: "error"
    • listener: ((error) => void)
        • (error): void
        • Parameters

          • error: unknown

          Returns void

    Returns this

  • Emitted when a new worker process is forked

    +

    Parameters

    • event: "workerFork"
    • listener: ((cluster) => void)

    Returns this

  • Emitted when a worker process is ready

    +

    Parameters

    • event: "workerReady"
    • listener: ((cluster) => void)

    Returns this

  • Emitted when a worker process exits

    +

    Parameters

    • event: "workerExit"
    • listener: ((code, signal, cluster) => void)
        • (code, signal, cluster): void
        • Parameters

          Returns void

    Returns this

  • Emitted when a Discord.js shard is ready

    +

    Parameters

    • event: "shardReady"
    • listener: ((event) => void)

    Returns this

  • Emitted when a Discord.js shard is reconnecting

    +

    Parameters

    • event: "shardReconnect"
    • listener: ((event) => void)

    Returns this

  • Emitted when a Discord.js shard resumes

    +

    Parameters

    • event: "shardResume"
    • listener: ((event) => void)

    Returns this

  • Emitted when a Discord.js shard disconnects

    +

    Parameters

    • event: "shardDisconnect"
    • listener: ((event) => void)

    Returns this

  • Emitted when a Discord.js client is ready

    +

    Parameters

    • event: "clientReady"
    • listener: ((event) => void)

    Returns this

  • Emitted on every ipc message the handler receives

    +

    Parameters

    • event: "raw"
    • listener: ((event) => void)
        • (event): void
        • Parameters

          • event: unknown

          Returns void

    Returns this

\ No newline at end of file diff --git a/docs/classes/client_ShardClient.ShardClient.html b/docs/classes/client_ShardClient.ShardClient.html index fb8d478..9150477 100644 --- a/docs/classes/client_ShardClient.ShardClient.html +++ b/docs/classes/client_ShardClient.ShardClient.html @@ -1,150 +1,7 @@ -ShardClient | indomitable
-
- -
-
-
-
- -

Class ShardClient

-
-

Hierarchy

-
    -
  • ShardClient
-
-
-
- -
-
-

Constructors

-
-
-

Properties

-
-
-

Methods

-
-
-

Constructors

-
- -
-
-

Properties

-
- -
client: Client<boolean>
-
- -
clusterId: number
-
- -
manager: Indomitable
-
-

Methods

-
- -
-
- -
-
- -
-
-

Generated using TypeDoc

-
\ No newline at end of file +ShardClient | indomitable

Constructors

Properties

Methods

Constructors

Properties

client: Client<boolean>
clusterId: number
manager: Indomitable

Methods

\ No newline at end of file diff --git a/docs/classes/client_ShardClientUtil.ShardClientUtil.html b/docs/classes/client_ShardClientUtil.ShardClientUtil.html index b9866c7..2dfa589 100644 --- a/docs/classes/client_ShardClientUtil.ShardClientUtil.html +++ b/docs/classes/client_ShardClientUtil.ShardClientUtil.html @@ -1,170 +1,52 @@ -ShardClientUtil | indomitable
-
- -
-
-
- -
-

A class for your interprocess communication needs

-
-
-
-

Hierarchy

-
    -
  • EventEmitter -
      -
    • ShardClientUtil
-
-
-
- -
-
-

Constructors

-
- -
-
-

Properties

-
- -
client: Client<boolean>
-
- -
clusterCount: number
-
- -
clusterId: number
-
- -
ipc: Worker
-
- -
mode: string
-
- -
shardCount: number
-
- -
shardIds: number[]
-
- -
captureRejectionSymbol: typeof captureRejectionSymbol
-

Value: Symbol.for('nodejs.rejection')

+ShardClientUtil | indomitable

A class that replaces d.js stock shard client util. The class is built similar to it with minor changes

+

Hierarchy

  • EventEmitter
    • ShardClientUtil

Constructors

Properties

client: Client<boolean>
clusterCount: number
clusterId: number
shardCount: number
shardIds: number[]
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

See how to write a custom rejection handler.

-
-
-

Since

v13.4.0, v12.16.0

-
-
- -
captureRejections: boolean
-

Value: boolean

+

Since

v13.4.0, v12.16.0

+
captureRejections: boolean

Value: boolean

Change the default captureRejections option on all new EventEmitter objects.

-
-
-

Since

v13.4.0, v12.16.0

-
-
- -
defaultMaxListeners: number
-

By default, a maximum of 10 listeners can be registered for any single +

Since

v13.4.0, v12.16.0

+
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single event. This limit can be changed for individual EventEmitter instances using the emitter.setMaxListeners(n) method. To change the default for allEventEmitter instances, the events.defaultMaxListenersproperty can be used. If this value is not a positive number, a RangeErroris thrown.

@@ -185,412 +67,76 @@
-
-

Since

v0.11.2

-
-
- -
errorMonitor: typeof errorMonitor
-

This symbol shall be used to install a listener for only monitoring 'error'events. Listeners installed using this symbol are called before the regular'error' listeners are called.

+

Since

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error'events. Listeners installed using this symbol are called before the regular'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an'error' event is emitted. Therefore, the process will still crash if no regular 'error' listener is installed.

-
-
-

Since

v13.6.0, v12.17.0

-
-
-

Methods

-
- -
    - -
  • -

    Alias for emitter.on(eventName, listener).

    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: string | symbol
    • -
    • -
      listener: ((...args) => void)
      -
        -
      • -
          -
        • (...args): void
        • -
        • -
          -

          Parameters

          -
            -
          • -
            Rest ...args: any[]
          -

          Returns void

    -

    Returns ShardClientUtil

    -
    -

    Since

    v0.1.26

    -
-
- -
    - -
  • -

    Evaluates a script or function on all clusters in the context of the client

    -
    -
    -

    Parameters

    -
      -
    • -
      script: Function
    • -
    • -
      context: any = {}
    -

    Returns Promise<unknown[]>

    A promise that resolves to an array of code results

    - -
-
- -
    - -
  • -

    Synchronously calls each of the listeners registered for the event namedeventName, in the order they were registered, passing the supplied arguments +

    Since

    v13.6.0, v12.17.0

    +

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest ...args: AnyRest

    Returns void

  • Alias for emitter.on(eventName, listener).

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v0.1.26

    +
  • Evaluates a script or function on all clusters in the context of the client

    +

    Parameters

    • script: Function
    • context: any = {}

    Returns Promise<unknown[]>

    A promise that resolves to an array of code results

    +
  • Synchronously calls each of the listeners registered for the event namedeventName, in the order they were registered, passing the supplied arguments to each.

    Returns true if the event had listeners, false otherwise.

    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener
    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: string | symbol
    • -
    • -
      Rest ...args: any[]
    -

    Returns boolean

    -
    -

    Since

    v0.1.26

    -
-
- -
    - -
  • -

    Returns an array listing the events for which the emitter has registered +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • Rest ...args: AnyRest

    Returns boolean

    Since

    v0.1.26

    +
  • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ]
    -
    -

    Returns (string | symbol)[]

    -
    -

    Since

    v6.0.0

    -
-
- -
    - -
  • -

    Fetches a client property value on all clusters

    -
    -
    -

    Parameters

    -
      -
    • -
      prop: string
    -

    Returns Promise<unknown[]>

    A promise that resolves to an array of code results

    - -
-
- -
    - -
  • -

    Gets the cached session info or fetches an updated session info

    -
    -
    -

    Parameters

    -
      -
    • -
      update: boolean = false
      -

      If you want to fetch and update the cached session info

      -
      -
    -

    Returns Promise<SessionObject>

    A session object

    - -
-
- -
    - -
  • -

    Returns the current max listener value for the EventEmitter which is either +

    Returns (string | symbol)[]

    Since

    v6.0.0

    +
  • Fetches a client property value on all clusters

    +

    Parameters

    • prop: string

    Returns Promise<unknown[]>

    A promise that resolves to an array of code results

    +
  • Gets the cached session info or fetches an updated session info

    +

    Parameters

    • update: boolean = false

      If you want to fetch and update the cached session info

      +

    Returns Promise<SessionObject>

    A session object

    +
  • Returns the current max listener value for the EventEmitter which is either set by emitter.setMaxListeners(n) or defaults to defaultMaxListeners.

    -
    -

    Returns number

    -
    -

    Since

    v1.0.0

    -
-
- -
    - -
  • -

    Returns the number of listeners listening for the event named eventName. +

    Returns number

    Since

    v1.0.0

    +
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: string | symbol
      -

      The name of the event being listened for

      -
      -
    • -
    • -
      Optional listener: Function
      -

      The event handler function

      -
      -
    -

    Returns number

    -
    -

    Since

    v3.2.0

    -
-
- -
    - -
  • -

    Returns a copy of the array of listeners for the event named eventName.

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      +
    • Optional listener: Function

      The event handler function

      +

    Returns number

    Since

    v3.2.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    server.on('connection', (stream) => {
    console.log('someone connected!');
    });
    console.log(util.inspect(server.listeners('connection')));
    // Prints: [ [Function] ]
    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: string | symbol
    -

    Returns Function[]

    -
    -

    Since

    v0.1.26

    -
-
- -
-
- -
-
- -
    - -
  • -

    Gets the current ipc delay

    -
    -

    Returns Promise<number>

    A promise that resolves to delay in nanoseconds

    - -
-
- -
    - -
  • -

    Adds the listener function to the beginning of the listeners array for the +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

    Returns Function[]

    Since

    v0.1.26

    +
  • Parameters

    • event: "message"
    • listener: ((message) => void)
        • (message): void
        • Parameters

          • message: unknown

          Returns void

    Returns this

  • Parameters

    • event: "message"
    • listener: ((message) => void)
        • (message): void
        • Parameters

          • message: unknown

          Returns void

    Returns this

  • Gets the current ipc delay

    +

    Returns Promise<number>

    A promise that resolves to delay in nanoseconds

    +
  • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventNameand listener will result in the listener being added, and called, multiple times.

    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    });

    Returns a reference to the EventEmitter, so that calls can be chained.

    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: string | symbol
      -

      The name of the event.

      -
      -
    • -
    • -
      listener: ((...args) => void)
      -

      The callback function

      -
      -
      -
        -
      • -
          -
        • (...args): void
        • -
        • -
          -

          Parameters

          -
            -
          • -
            Rest ...args: any[]
          -

          Returns void

    -

    Returns ShardClientUtil

    -
    -

    Since

    v6.0.0

    -
-
- -
    - -
  • -

    Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event.

      +
    • listener: ((...args) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    });

    Returns a reference to the EventEmitter, so that calls can be chained.

    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: string | symbol
      -

      The name of the event.

      -
      -
    • -
    • -
      listener: ((...args) => void)
      -

      The callback function

      -
      -
      -
        -
      • -
          -
        • (...args): void
        • -
        • -
          -

          Parameters

          -
            -
          • -
            Rest ...args: any[]
          -

          Returns void

    -

    Returns ShardClientUtil

    -
    -

    Since

    v6.0.0

    -
-
- -
    - -
  • -

    Returns a copy of the array of listeners for the event named eventName, +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event.

      +
    • listener: ((...args) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v6.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName, including any wrappers (such as those created by .once()).

    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log');
    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: string | symbol
    -

    Returns Function[]

    -
    -

    Since

    v9.4.0

    -
-
- -
    - -
  • -

    Removes all listeners, or those of the specified eventName.

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

    Returns Function[]

    Since

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    It is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).

    Returns a reference to the EventEmitter, so that calls can be chained.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional event: string | symbol
    -

    Returns ShardClientUtil

    -
    -

    Since

    v0.1.26

    -
-
- -
    - -
  • -

    Removes the specified listener from the listener array for the event namedeventName.

    +

    Parameters

    • Optional eventName: string | symbol

    Returns this

    Since

    v0.1.26

    +
-
- -
    - -
  • -

    Restarts the given cluster from the clusterId given

    -
    -
    -

    Parameters

    -
      -
    • -
      clusterId: number
    -

    Returns Promise<undefined>

    A promise that resolves to void

    - -
-
- -
    - -
  • -

    Restarts all the clusters Indomitable handles sequentially

    -
    -

    Returns Promise<undefined>

    A promise that resolves to void

    - -
-
- -
    - -
  • -

    Shortcut to send a message to the parent process

    -
    -
    -

    Parameters

    -
    -

    Returns Promise<unknown>

    A promise that resolves to void or a repliable object

    - -
-
- -
    - -
  • -

    By default EventEmitters will print a warning if more than 10 listeners are +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v0.1.26

    +
  • Restarts the given cluster from the clusterId given

    +

    Parameters

    • clusterId: number

    Returns Promise<undefined>

    A promise that resolves to void

    +
  • Restarts all the clusters Indomitable handles sequentially

    +

    Returns Promise<undefined>

    A promise that resolves to void

    +
  • Sends a message to primary process

    +

    Parameters

    Returns Promise<unknown>

    A promise that resolves to void or a repliable object

    +
  • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set toInfinity (or 0) to indicate an unlimited number of listeners.

    Returns a reference to the EventEmitter, so that calls can be chained.

    -
    -
    -

    Parameters

    -
      -
    • -
      n: number
    -

    Returns ShardClientUtil

    -
    -

    Since

    v0.3.5

    -
-
- -
    - -
  • -

    Returns a copy of the array of listeners for the event named eventName.

    +

    Parameters

    • n: number

    Returns this

    Since

    v0.3.5

    +
  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    +

    Parameters

    • signal: AbortSignal
    • resource: ((event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    Since

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    For EventEmitters this behaves exactly the same as calling .listeners on the emitter.

    For EventTargets this is the only way to get the event listeners for the event target. This is useful for debugging and diagnostic purposes.

    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    }
    -
    -
    -

    Parameters

    -
      -
    • -
      emitter: EventEmitter | _DOMEventTarget
    • -
    • -
      name: string | symbol
    -

    Returns Function[]

    -
    -

    Since

    v15.2.0, v14.17.0

    -
-
- -
    - -
  • -

    A class method that returns the number of listeners for the given eventNameregistered on the given emitter.

    +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | _DOMEventTarget
    • name: string | symbol

    Returns Function[]

    Since

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | _DOMEventTarget

    Returns number

    Since

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventNameregistered on the given emitter.

    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2
    -
    -
    -

    Parameters

    -
      -
    • -
      emitter: EventEmitter
      -

      The emitter to query

      -
      -
    • -
    • -
      eventName: string | symbol
      -

      The event name

      -
      -
    -

    Returns number

    -
    -

    Since

    v0.9.12

    - +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    Since

    v0.9.12

    Deprecated

    Since v3.2.0 - Use listenerCount instead.

    -
-
- -
    - -
  • -
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here

    Returns an AsyncIterator that iterates eventName events. It will throw if the EventEmitter emits 'error'. It removes all listeners when @@ -776,51 +219,10 @@

    -
    -

    Parameters

    -
      -
    • -
      emitter: EventEmitter
    • -
    • -
      eventName: string
      -

      The name of the event being listened for

      -
      -
    • -
    • -
      Optional options: StaticEventEmitterOptions
    -

    Returns AsyncIterableIterator<any>

    that iterates eventName events emitted by the emitter

    - -
    -

    Since

    v13.6.0, v12.16.0

    -
  • - -
  • -
    -

    Type Parameters

    -
      -
    • -

      E extends __module

    • -
    • -

      K extends keyof ClientEvents

    -
    -

    Parameters

    -
      -
    • -
      eventEmitter: E
    • -
    • -
      eventName: E extends Client<boolean>
          ? K
          : string
    -

    Returns AsyncIterableIterator<E extends Client<boolean>
        ? ClientEvents[K]
        : any>

-
- -
    - -
  • -

    Creates a Promise that is fulfilled when the EventEmitter emits the given +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string

      The name of the event being listened for

      +
    • Optional options: StaticEventEmitterOptions

    Returns AsyncIterableIterator<any>

    that iterates eventName events emitted by the emitter

    +

    Since

    v13.6.0, v12.16.0

    +
  • Type Parameters

    • Emitter extends __module
    • Events extends keyof ClientEvents

    Parameters

    Returns AsyncIterableIterator<Emitter extends Client<boolean>
        ? ClientEvents[Events]
        : any>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given event or that is rejected if the EventEmitter emits 'error' while waiting. The Promise will resolve with an array of all the arguments emitted to the given event.

    @@ -836,185 +238,10 @@
    -
    -

    Parameters

    -
      -
    • -
      emitter: _NodeEventTarget
    • -
    • -
      eventName: string | symbol
    • -
    • -
      Optional options: StaticEventEmitterOptions
    -

    Returns Promise<any[]>

    -
    -

    Since

    v11.13.0, v10.16.0

    -
  • - -
  • -
    -

    Parameters

    -
      -
    • -
      emitter: _DOMEventTarget
    • -
    • -
      eventName: string
    • -
    • -
      Optional options: StaticEventEmitterOptions
    -

    Returns Promise<any[]>

  • - -
  • -
    -

    Type Parameters

    -
      -
    • -

      E extends __module

    • -
    • -

      K extends keyof ClientEvents

    -
    -

    Parameters

    -
      -
    • -
      eventEmitter: E
    • -
    • -
      eventName: E extends Client<boolean>
          ? K
          : string
    -

    Returns Promise<E extends Client<boolean>
        ? ClientEvents[K]
        : any[]>

-
- -
    - -
  • -
    import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optional options: StaticEventEmitterOptions

    Returns Promise<any[]>

    Since

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: _DOMEventTarget
    • eventName: string
    • Optional options: StaticEventEmitterOptions

    Returns Promise<any[]>

  • Type Parameters

    • Emitter extends __module
    • Event extends keyof ClientEvents

    Parameters

    Returns Promise<Emitter extends Client<boolean>
        ? ClientEvents[Event]
        : any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter);
    -
    -
    -

    Parameters

    -
      -
    • -
      Optional n: number
      -

      A non-negative number. The maximum number of listeners per EventTarget event.

      -
      -
    • -
    • -
      Rest ...eventTargets: (EventEmitter | _DOMEventTarget)[]
    -

    Returns void

    -
    -

    Since

    v15.4.0

    -
-
-

Events

-
- -
    - -
  • -

    Emitted when an IPC message from parent process is received

    -
    -
    -

    Parameters

    -
      -
    • -
      event: "message"
    • -
    • -
      listener: ((message) => void)
      -
        -
      • -
          -
        • (message): void
        • -
        • -
          -

          Parameters

          -
            -
          • -
            message: unknown
          -

          Returns void

    -

    Returns ShardClientUtil

    -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file +

Parameters

  • Optional n: number

    A non-negative number. The maximum number of listeners per EventTarget event.

    +
  • Rest ...eventTargets: (EventEmitter<DefaultEventMap> | _DOMEventTarget)[]

Returns void

Since

v15.4.0

+

Events

  • Emitted when an IPC message from parent process is received

    +

    Parameters

    • event: "message"
    • listener: ((message) => void)
        • (message): void
        • Parameters

          • message: unknown

          Returns void

    Returns this

\ No newline at end of file diff --git a/docs/classes/concurrency_ConcurrencyClient.ConcurrencyClient.html b/docs/classes/concurrency_ConcurrencyClient.ConcurrencyClient.html index b2bfcf3..1605d02 100644 --- a/docs/classes/concurrency_ConcurrencyClient.ConcurrencyClient.html +++ b/docs/classes/concurrency_ConcurrencyClient.ConcurrencyClient.html @@ -1,137 +1,8 @@ -ConcurrencyClient | indomitable
-
- -
-
-
- -
-

Hierarchy

-
    -
  • ConcurrencyClient
-
-
-
- -
-
-

Constructors

-
-
-

Properties

-
-
-

Methods

-
-
-

Constructors

-
- -
-
-

Properties

-
- -
-
-

Methods

-
- -
-
- -
-
- -
-
-

Generated using TypeDoc

-
\ No newline at end of file +ConcurrencyClient | indomitable

Internal class that is passed to @discordjs/ws to handle concurrency

+

Constructors

Properties

ipc +

Methods

Constructors

Properties

Methods

  • Aborts an acquire lock request

    +

    Parameters

    • shardId: number

    Returns void

  • Method to try and acquire a lock for identify

    +

    Parameters

    • shardId: number
    • signal: AbortSignal

    Returns Promise<void>

\ No newline at end of file diff --git a/docs/classes/concurrency_ConcurrencyManager.ConcurrencyManager.html b/docs/classes/concurrency_ConcurrencyManager.ConcurrencyManager.html index 8bb162e..eba34d5 100644 --- a/docs/classes/concurrency_ConcurrencyManager.ConcurrencyManager.html +++ b/docs/classes/concurrency_ConcurrencyManager.ConcurrencyManager.html @@ -1,146 +1,9 @@ -ConcurrencyManager | indomitable
-
- -
-
-
- -
-

A wrapper for @discordjs/ws to work exclusively with Indomitable's dynamic concurrency with support for abort controller

-
-
-
-

Hierarchy

-
    -
  • ConcurrencyManager
-
-
-
- -
-
-

Constructors

-
-
-

Properties

-
-
-

Methods

-
-
-

Constructors

-
- -
-
-

Properties

-
- -
signals: Map<number, AbortController>
-
- -
throttler: SimpleIdentifyThrottler
-
-

Methods

-
- -
-
- -
-
- -
-
-

Generated using TypeDoc

-
\ No newline at end of file +ConcurrencyManager | indomitable

A wrapper for @discordjs/ws to work exclusively with Indomitable's dynamic concurrency with support for abort controller

+

Constructors

Properties

Methods

Constructors

Properties

signals: Map<number, AbortController>
throttler: SimpleIdentifyThrottler

Methods

\ No newline at end of file diff --git a/docs/classes/ipc_BaseIpc.BaseIpc.html b/docs/classes/ipc_BaseIpc.BaseIpc.html index cb59526..3e7e20d 100644 --- a/docs/classes/ipc_BaseIpc.BaseIpc.html +++ b/docs/classes/ipc_BaseIpc.BaseIpc.html @@ -1,218 +1,21 @@ -BaseIpc | indomitable
-
- -
-
-
-
- -

Class BaseIpcAbstract

-
-

Hierarchy

-
-
-
-
- -
-
-

Constructors

-
-
-

Properties

-
-
-

Accessors

-
-
-

Methods

-
-
-

Constructors

-
- -
-
-

Properties

-
- -
manager: Indomitable
-
- -
promises: Map<string, InternalPromise>
-
-

Accessors

-
- -
-
-

Methods

-
- -
    - -
  • -
    -

    Parameters

    -
      -
    • -
      reason: string
    -

    Returns void

-
- -
    - -
  • -
    -

    Parameters

    -
    -

    Returns boolean | void | Promise<boolean | void>

-
- -
-
- -
    - -
  • -
    -

    Parameters

    -
      -
    • -
      data: Serializable
    • -
    • -
      errorCallback: ((error) => any)
      -
        -
      • -
          -
        • (error): any
        • -
        • -
          -

          Parameters

          -
            -
          • -
            error: unknown
          -

          Returns any

    -

    Returns Promise<boolean | void>

-
- -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file +BaseIpc | indomitable

Class BaseIpcAbstract

Base class where primary and worker ipc inherits

+

Hierarchy (view full)

Constructors

Properties

manager: __module | Indomitable
promises: Map<string, InternalPromise>

Accessors

  • get pendingPromises(): number
  • Number of promises pending to be resolved

    +

    Returns number

Methods

  • Rejects all the pending promises

    +

    Parameters

    • reason: string

    Returns void

  • Internal

    Taps into message event of worker or primary process to handle ipc communication

    +

    Parameters

    • data: Serializable
    • errorCallback: ((error) => any)
        • (error): any
        • Parameters

          • error: unknown

          Returns any

    Returns Promise<boolean | void>

  • Raw send method without abort controller handling

    +

    Parameters

    Returns Promise<unknown>

\ No newline at end of file diff --git a/docs/classes/ipc_BaseWorker.BaseWorker.html b/docs/classes/ipc_BaseWorker.BaseWorker.html new file mode 100644 index 0000000..2cf2d1f --- /dev/null +++ b/docs/classes/ipc_BaseWorker.BaseWorker.html @@ -0,0 +1,19 @@ +BaseWorker | indomitable

Basic worker ipc class, basic child process ipc handler

+

Hierarchy (view full)

Constructors

Properties

manager: __module | Indomitable
promises: Map<string, InternalPromise>

Accessors

  • get pendingPromises(): number
  • Number of promises pending to be resolved

    +

    Returns number

Methods

  • Internal

    Taps into message event of worker or primary process to handle ipc communication

    +

    Parameters

    • data: Serializable
    • errorCallback: ((error) => any)
        • (error): any
        • Parameters

          • error: unknown

          Returns any

    Returns Promise<boolean | void>

\ No newline at end of file diff --git a/docs/classes/ipc_ClientWorker.ClientWorker.html b/docs/classes/ipc_ClientWorker.ClientWorker.html new file mode 100644 index 0000000..e48f1dd --- /dev/null +++ b/docs/classes/ipc_ClientWorker.ClientWorker.html @@ -0,0 +1,20 @@ +ClientWorker | indomitable

Extended worker ipc class, shard client util ipc class

+

Hierarchy (view full)

Constructors

Properties

manager: __module | Indomitable
promises: Map<string, InternalPromise>

Accessors

  • get pendingPromises(): number
  • Number of promises pending to be resolved

    +

    Returns number

Methods

  • Internal

    Taps into message event of worker or primary process to handle ipc communication

    +

    Parameters

    • data: Serializable
    • errorCallback: ((error) => any)
        • (error): any
        • Parameters

          • error: unknown

          Returns any

    Returns Promise<boolean | void>

\ No newline at end of file diff --git a/docs/classes/ipc_Main.Main.html b/docs/classes/ipc_Main.Main.html deleted file mode 100644 index 4b0430e..0000000 --- a/docs/classes/ipc_Main.Main.html +++ /dev/null @@ -1,232 +0,0 @@ -Main | indomitable
-
- -
-
-
-
- -

Class Main

-
-

Hierarchy

-
-
-
-
- -
-
-

Constructors

-
-
-

Properties

-
-
-

Accessors

-
-
-

Methods

-
-
-

Constructors

-
- -
-
-

Properties

-
- -
-
- -
manager: Indomitable
-
- -
promises: Map<string, InternalPromise>
-
-

Accessors

-
- -
    -
  • get pendingPromises(): number
  • -
  • -

    Returns number

-
-

Methods

-
- -
-
- -
-
- -
    - -
  • -
    -

    Parameters

    -
      -
    • -
      data: Serializable
    • -
    • -
      errorCallback: ((error) => any)
      -
        -
      • -
          -
        • (error): any
        • -
        • -
          -

          Parameters

          -
            -
          • -
            error: unknown
          -

          Returns any

    -

    Returns Promise<boolean | void>

-
- -
-
- -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/classes/ipc_MainWorker.MainWorker.html b/docs/classes/ipc_MainWorker.MainWorker.html new file mode 100644 index 0000000..38c85a9 --- /dev/null +++ b/docs/classes/ipc_MainWorker.MainWorker.html @@ -0,0 +1,20 @@ +MainWorker | indomitable

Primary ipc class. Only initialized at main process

+

Hierarchy (view full)

Constructors

Properties

manager: __module | Indomitable
promises: Map<string, InternalPromise>

Accessors

  • get pendingPromises(): number
  • Number of promises pending to be resolved

    +

    Returns number

Methods

  • Internal

    Taps into message event of worker or primary process to handle ipc communication

    +

    Parameters

    • data: Serializable
    • errorCallback: ((error) => any)
        • (error): any
        • Parameters

          • error: unknown

          Returns any

    Returns Promise<boolean | void>

\ No newline at end of file diff --git a/docs/classes/ipc_Worker.Worker.html b/docs/classes/ipc_Worker.Worker.html deleted file mode 100644 index 73cb00c..0000000 --- a/docs/classes/ipc_Worker.Worker.html +++ /dev/null @@ -1,234 +0,0 @@ -Worker | indomitable
-
- -
-
-
-
- -

Class Worker

-
-

Hierarchy

-
-
-
-
- -
-
-

Constructors

-
-
-

Properties

-
-
-

Accessors

-
-
-

Methods

-
-
-

Constructors

-
- -
-
-

Properties

-
- -
manager: Indomitable
-
- -
promises: Map<string, InternalPromise>
-
- -
-
-

Accessors

-
- -
    -
  • get pendingPromises(): number
  • -
  • -

    Returns number

-
-

Methods

-
- -
-
- -
-
- -
    - -
  • -
    -

    Parameters

    -
      -
    • -
      data: Serializable
    • -
    • -
      errorCallback: ((error) => any)
      -
        -
      • -
          -
        • (error): any
        • -
        • -
          -

          Parameters

          -
            -
          • -
            error: unknown
          -

          Returns any

    -

    Returns Promise<boolean | void>

-
- -
-
- -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/classes/manager_ClusterManager.ClusterManager.html b/docs/classes/manager_ClusterManager.ClusterManager.html index 3b316a8..44198f1 100644 --- a/docs/classes/manager_ClusterManager.ClusterManager.html +++ b/docs/classes/manager_ClusterManager.ClusterManager.html @@ -1,249 +1,24 @@ -ClusterManager | indomitable
-
- -
-
-
- -
-

A class to manage a cluster

-
-
-
-

Hierarchy

-
    -
  • ClusterManager
-
-
-
- -
-
-

Constructors

-
-
-

Properties

-
-
-

Methods

-
-
-

Constructors

-
- -
-
-

Properties

-
- -
id: number
-
- -
ipc: Main
-
- -
manager: Indomitable
-
- -
ready: boolean
-
- -
readyAt: number
-
- -
shards: number[]
-
- -
started: boolean
-
- -
worker?: Worker
-
-

Methods

-
- -
    - -
  • -

    Remove all listeners on attached worker process and free from memory

    -
    -
    -

    Parameters

    -
      -
    • -
      code: null | number
    • -
    • -
      signal: null | string
    -

    Returns void

    -
-
- -
    - -
  • -

    Destroy associated worker process

    -
    -
    -

    Parameters

    -
      -
    • -
      signal: string = 'SIGTERM'
      -

      Process exit signal

      -
      -
    -

    Returns void

    -
-
- -
    - -
  • -

    Respawn associated worker process

    -
    -
    -

    Parameters

    -
      -
    • -
      delay: number = ...
      -

      Time to wait before restarting worker process

      -
      -
    -

    Returns Promise<void>

    -
-
- -
-
- -
    - -
  • Internal -

    Waits for this cluster to be ready

    -
    -

    Returns Promise<void>

    A promise that resolves to void

    - -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file +ClusterManager | indomitable

A class to manage a cluster

+

Constructors

Properties

Methods

Constructors

Properties

id: number
manager: Indomitable
ready: boolean
readyAt: number
shards: number[]
started: boolean
worker?: Worker

Methods

  • Remove all listeners on attached worker process and free from memory

    +

    Parameters

    • code: null | number
    • signal: null | string

    Returns void

  • Destroy associated worker process

    +

    Parameters

    • signal: string = 'SIGTERM'

      Process exit signal

      +

    Returns void

  • Respawn associated worker process

    +

    Parameters

    • delay: number = ...

      Time to wait before restarting worker process

      +

    Returns Promise<void>

\ No newline at end of file diff --git a/docs/enums/Util.ClientEvents.html b/docs/enums/Util.ClientEvents.html index c22c6fd..4369021 100644 --- a/docs/enums/Util.ClientEvents.html +++ b/docs/enums/Util.ClientEvents.html @@ -1,181 +1,8 @@ -ClientEvents | indomitable
-
- -
-
-
-
- -

Enumeration ClientEvents

-
-

Events for internal use

-
-
-
-
-
- -
-
-

Enumeration Members

-
- -
CANCEL_IDENTIFY: "cancelIdentify"
-
- -
DESTROY_CLIENT: "destroyClient"
-
- -
EVAL: "eval"
-
- -
PING: "ping"
-
- -
READY: "ready"
-
- -
REQUEST_IDENTIFY: "requestIdentify"
-
- -
RESTART: "restart"
-
- -
RESTART_ALL: "restartAll"
-
- -
SESSION_INFO: "sessionInfo"
-
- -
SHARD_DISCONNECT: "shardDisconnect"
-
- -
SHARD_READY: "shardReady"
-
- -
SHARD_RECONNECT: "shardReconnect"
-
- -
SHARD_RESUME: "shardResume"
-
-
-

Generated using TypeDoc

-
\ No newline at end of file +ClientEvents | indomitable

Enumeration ClientEvents

Events for internal use

+

Enumeration Members

ERROR: "ERROR"
READY: "ready"
SHARD_DISCONNECT: "shardDisconnect"
SHARD_READY: "shardReady"
SHARD_RECONNECT: "shardReconnect"
SHARD_RESUME: "shardResume"
\ No newline at end of file diff --git a/docs/enums/Util.InternalOps.html b/docs/enums/Util.InternalOps.html new file mode 100644 index 0000000..1306eff --- /dev/null +++ b/docs/enums/Util.InternalOps.html @@ -0,0 +1,10 @@ +InternalOps | indomitable

Enumeration InternalOps

Internal operation codes

+

Enumeration Members

CANCEL_IDENTIFY: "cancelIdentify"
DESTROY_CLIENT: "destroyClient"
EVAL: "eval"
PING: "ping"
REQUEST_IDENTIFY: "requestIdentify"
RESTART: "restart"
RESTART_ALL: "restartAll"
SESSION_INFO: "sessionInfo"
\ No newline at end of file diff --git a/docs/enums/Util.LibraryEvents.html b/docs/enums/Util.LibraryEvents.html index dbdf9f2..ef5c364 100644 --- a/docs/enums/Util.LibraryEvents.html +++ b/docs/enums/Util.LibraryEvents.html @@ -1,167 +1,14 @@ -LibraryEvents | indomitable
-
- -
-
-
-
- -

Enumeration LibraryEvents

-
-

Events emitted by Indomitable

-
-
-
-
-
- -
-
-

Enumeration Members

-
- -
CLIENT_READY: "clientReady"
-
- -
DEBUG: "debug"
-
- -
ERROR: "error"
-
- -
MESSAGE: "message"
-
- -
SHARD_DISCONNECT: "shardDisconnect"
-
- -
SHARD_READY: "shardReady"
-
- -
SHARD_RECONNECT: "shardReconnect"
-
- -
SHARD_RESUME: "shardResume"
-
- -
WORKER_EXIT: "workerExit"
-
- -
WORKER_FORK: "workerFork"
-
- -
WORKER_READY: "workerReady"
-
-
-

Generated using TypeDoc

-
\ No newline at end of file +LibraryEvents | indomitable

Enumeration LibraryEvents

Events emitted by Indomitable

+

Enumeration Members

CLIENT_READY: "clientReady"
DEBUG: "debug"
ERROR: "error"
MESSAGE: "message"
RAW: "raw"
SHARD_DISCONNECT: "shardDisconnect"
SHARD_READY: "shardReady"
SHARD_RECONNECT: "shardReconnect"
SHARD_RESUME: "shardResume"
WORKER_EXIT: "workerExit"
WORKER_FORK: "workerFork"
WORKER_READY: "workerReady"
\ No newline at end of file diff --git a/docs/enums/Util.MainStrategyOps.html b/docs/enums/Util.MainStrategyOps.html new file mode 100644 index 0000000..643b86f --- /dev/null +++ b/docs/enums/Util.MainStrategyOps.html @@ -0,0 +1,7 @@ +MainStrategyOps | indomitable

Enumeration MainStrategyOps

Internal operation codes for the cluster -> thread

+

Enumeration Members

Enumeration Members

CONNECT: "connect"
DESTROY: "destroy"
RECONNECT: "reconnect"
SEND: "send"
STATUS: "status"
\ No newline at end of file diff --git a/docs/enums/Util.RawIpcMessageType.html b/docs/enums/Util.RawIpcMessageType.html index 9a2ce9a..57b4570 100644 --- a/docs/enums/Util.RawIpcMessageType.html +++ b/docs/enums/Util.RawIpcMessageType.html @@ -1,104 +1,5 @@ -RawIpcMessageType | indomitable
-
- -
-
-
-
- -

Enumeration RawIpcMessageType

-
-

Type for raw ipc message

-
-
-
-
-
- -
-
-

Enumeration Members

-
-
-

Enumeration Members

-
- -
MESSAGE: "message"
-
- -
RESPONSE: "response"
-
-
-

Generated using TypeDoc

-
\ No newline at end of file +RawIpcMessageType | indomitable

Enumeration RawIpcMessageType

Type for raw ipc message

+

Enumeration Members

Enumeration Members

ERROR: "error"
MESSAGE: "message"
RESPONSE: "response"
\ No newline at end of file diff --git a/docs/enums/Util.ThreadStrategyOps.html b/docs/enums/Util.ThreadStrategyOps.html new file mode 100644 index 0000000..99076c8 --- /dev/null +++ b/docs/enums/Util.ThreadStrategyOps.html @@ -0,0 +1,7 @@ +ThreadStrategyOps | indomitable

Enumeration ThreadStrategyOps

Internal operation codes for the thread <- cluster

+

Enumeration Members

CANCEL_IDENTIFY: "cancelIdentify"
REQUEST_IDENTIFY: "requestIdentify"
RETRIEVE_SESSION: "retrieveSession"
SHARD_EVENT: "shardEvent"
UPDATE_SESSION: "updateSession"
\ No newline at end of file diff --git a/docs/functions/Util.Chunk.html b/docs/functions/Util.Chunk.html index cb8f86e..fc37cce 100644 --- a/docs/functions/Util.Chunk.html +++ b/docs/functions/Util.Chunk.html @@ -1,94 +1,5 @@ -Chunk | indomitable
-
- -
-
-
-
- -

Function Chunk

-
-
    - -
  • -

    Modify an array to contain the specified amount of chunks

    -
    -
    -

    Parameters

    -
      -
    • -
      original: any[]
      -

      An array of data

      -
      -
    • -
    • -
      chunks: number
      -

      The amount of chunks to transform into

      -
      -
    -

    Returns any[]

    A modified array

    - -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file +Chunk | indomitable

Function Chunk

  • Modify an array to contain the specified amount of chunks

    +

    Parameters

    • original: any[]

      An array of data

      +
    • chunks: number

      The amount of chunks to transform into

      +

    Returns any[]

    A modified array

    +
\ No newline at end of file diff --git a/docs/functions/Util.Delay.html b/docs/functions/Util.Delay.html index 8438cf2..ff232d8 100644 --- a/docs/functions/Util.Delay.html +++ b/docs/functions/Util.Delay.html @@ -1,89 +1,4 @@ -Delay | indomitable
-
- -
-
-
-
- -

Function Delay

-
-
    - -
  • -

    Wait for a specific amount of time (timeout)

    -
    -
    -

    Parameters

    -
      -
    • -
      ms: number
      -

      Time to wait in milliseconds

      -
      -
    -

    Returns Promise<void>

    A promise that resolves in x seconds

    - -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file +Delay | indomitable

Function Delay

  • Wait for a specific amount of time (timeout)

    +

    Parameters

    • ms: number

      Time to wait in milliseconds

      +

    Returns Promise<void>

    A promise that resolves in x seconds

    +
\ No newline at end of file diff --git a/docs/functions/Util.Fetch.html b/docs/functions/Util.Fetch.html index f89fcb9..bb4d2ef 100644 --- a/docs/functions/Util.Fetch.html +++ b/docs/functions/Util.Fetch.html @@ -1,94 +1,5 @@ -Fetch | indomitable
-
- -
-
-
-
- -

Function Fetch

-
-
    - -
  • -

    Wrapper function for fetching data using HTTP

    -
    -
    -

    Parameters

    -
      -
    • -
      url: string | URL
      -

      URL of resource to fetch

      -
      -
    • -
    • -
      options: RequestOptions
      -

      RequestOptions to modify behavior

      -
      -
    -

    Returns Promise<any>

    A promise containing data fetched, or an error

    - -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file +Fetch | indomitable

Function Fetch

  • Wrapper function for fetching data using HTTP

    +

    Parameters

    • url: string | URL

      URL of resource to fetch

      +
    • options: RequestOptions

      RequestOptions to modify behavior

      +

    Returns Promise<any>

    A promise containing data fetched, or an error

    +
\ No newline at end of file diff --git a/docs/functions/Util.FetchSessions.html b/docs/functions/Util.FetchSessions.html index a9dd636..74a5e7d 100644 --- a/docs/functions/Util.FetchSessions.html +++ b/docs/functions/Util.FetchSessions.html @@ -1,89 +1,4 @@ -FetchSessions | indomitable
-
- -
-
-
-
- -

Function FetchSessions

-
-
    - -
  • -

    Fetch sessions from discord

    -
    -
    -

    Parameters

    -
      -
    • -
      token: string
      -

      Bot token

      -
      -
    -

    Returns Promise<SessionObject>

    A promise containing a session object

    - -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file +FetchSessions | indomitable

Function FetchSessions

\ No newline at end of file diff --git a/docs/functions/Util.MakeAbortableRequest.html b/docs/functions/Util.MakeAbortableRequest.html index 6254dcc..baec26f 100644 --- a/docs/functions/Util.MakeAbortableRequest.html +++ b/docs/functions/Util.MakeAbortableRequest.html @@ -1,89 +1,4 @@ -MakeAbortableRequest | indomitable
-
- -
-
-
-
- -

Function MakeAbortableRequest

-
-
    - -
  • -

    Creates an abortable request with controller and timeout

    -
    -
    -

    Parameters

    -
      -
    • -
      delay: number
      -

      Time before an abort error throws

      -
      -
    -

    Returns AbortableData

    An abortable data with controller and timeout

    - -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file +MakeAbortableRequest | indomitable

Function MakeAbortableRequest

  • Creates an abortable request with controller and timeout

    +

    Parameters

    • delay: number

      Time before an abort error throws

      +

    Returns AbortableData

    An abortable data with controller and timeout

    +
\ No newline at end of file diff --git a/docs/hierarchy.html b/docs/hierarchy.html new file mode 100644 index 0000000..d51e280 --- /dev/null +++ b/docs/hierarchy.html @@ -0,0 +1 @@ +indomitable

indomitable

Class Hierarchy

\ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 0c6eb76..188cd44 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,19 +1,5 @@ -indomitable
-
- -
-
-
-
-

indomitable

-

Indomitable

-

A lightweight (the actual ship is heavy though), performant, powerful & no dependency sharder for Discord.JS

+indomitable

indomitable

Indomitable

+

A lightweight (the actual ship is heavy though), performant, and powerful sharder for Discord.JS

@@ -22,9 +8,6 @@

indomitable

The ShipGirl Project; ⓒ Azur Lane

-
    -
  • Supports Discord.JS v13 and v14
  • -

Features

  • Fast

  • @@ -34,20 +17,20 @@

    indomitable

  • ESM & CommonJS supported

  • -
  • Concurrency Support

    +
  • Shard Concurrency Support

  • -
  • Promisified IPC (Bi-directional)

    +
  • Easy to use promised based IPC

  • -
  • No dependencies (v2 onwards)

    +
  • No dependencies

  • -
  • Very cute (and lazy like the Kaiju Princess! If you know, you know)

    +
  • Very cute (and lazy)

  • Used in prod by the ff:

    Chip (https://chipbot.gg/)

    -

    Kashima (https://kashima.saya.moe/)

    +

    Kashima (https://kashima.saya.moe/)

    Or add your own!

    @@ -64,49 +47,49 @@

    indomitable

    npm install https://github.com/Deivu/Indomitable.git#master

    -

    Documentation

    🔗 https://deivu.github.io/Indomitable/index.html

    +

    Documentation

    🔗 https://indomitable.shipgirl.moe/

    Don't forget to read my "Notes" below!

    Example Usage

    Basic usage

    -
    const { Indomitable } = require('indomitable');
    const { Client } = require('discord.js');
    const token = 'your_token';

    const manager = new Indomitable({ client: Client, token })
    .on('error', console.error);

    manager.spawn(); +
    const { Indomitable } = require("indomitable");
    const { Client } = require("discord.js");
    const token = "your_token";

    const manager = new Indomitable({ client: Client, token }).on(
    "error",
    console.error
    );

    manager.spawn();

    Basic usage with more Indomitable Options

    -
    const { Indomitable } = require('indomitable');
    const { Client } = require('discord.js');
    const token = 'your_token';

    const options = {
    // Processes to run
    clusterCount: 2,
    // Websocket shards to run
    shardCount: 8,
    // Discord.JS options
    clientOptions: {
    intents: [1 << 0] // Bitwise for GUILD intent only
    },
    // Auto restart processes that have been killed
    autoRestart: true, // This defaults to false by default unless you specify it
    // Your Discord.JS client
    client: Client,
    // Your bot token
    token
    }

    const manager = new Indomitable(options)
    .on('error', console.error);

    manager.spawn(); +
    const { Indomitable } = require("indomitable");
    const { Client } = require("discord.js");
    const token = "your_token";

    const options = {
    // Processes to run
    clusterCount: 2,
    // Websocket shards to run
    shardCount: 8,
    // Discord.js options
    clientOptions: {
    intents: [1 << 0], // Bitwise for GUILD intent only
    },
    // Auto restart processes that have been killed
    // This defaults to false by default unless you specify it
    autoRestart: true,
    // Discord.js client
    client: Client,
    // Your bot token
    token,
    };

    const manager = new Indomitable(options).on("error", console.error);

    manager.spawn();

    Broadcasteval as one way to get data across shards

    -
    // Saya's note:
    // Not recommended as every broadcastEval uses eval() internally
    // Consider learning the ipc system of this library in future to get data across your clusters
    client.shard
    .broadcastEval(client => client.guilds.cache.size)
    .then(console.log); +
    // Saya's note:
    // Not recommended as every broadcastEval uses eval() internally
    // Consider learning the ipc system of this library in future to get data across your clusters
    client.shard
    .broadcastEval((client) => client.guilds.cache.size)
    .then(console.log);

    Example of a very basic ipc communication (non repliable)

    -
    // Primary Process
    indomitable.on('message', message => {
    if (message.content.op === 'something') {
    doSomething();
    }
    });
    // Worker Process (your client most likely)
    client.shard.send({ content: { op: 'something' } })
    .catch(console.error); +
    // Primary Process
    indomitable.on("message", (message) => {
    if (message.content.op === "something") {
    doSomething();
    }
    });
    // ClientWorker Process (your client most likely)
    client.shard.send({ content: { op: "something" } }).catch(console.error);

    Example of a very basic ipc communication (repliable)

    -
    // Primary Process
    indomitable.on('message', message => {
    if (message.content.op === 'something') {
    if (!message.repliable) return; // check if the message is repliable just incase, though it won't error even it is not
    const someValue = doSomething();
    message.reply(someValue);
    }
    });
    // Worker Process (your client most likely)
    client.shard.send({ content: { op: 'something' }, repliable: true })
    .then(console.log)
    .catch(console.error); +
    // Primary Process
    indomitable.on("message", (message) => {
    if (message.content.op === "something") {
    if (!message.repliable) return; // check if the message is repliable just incase, though it won't error even it is not
    const someValue = doSomething();
    message.reply(someValue);
    }
    });
    // ClientWorker Process (your client most likely)
    client.shard
    .send({ content: { op: "something" }, repliable: true })
    .then(console.log)
    .catch(console.error);

    You could also do it reversely (main process asking data from clusters instead of clusters asking main process)

    -
    // Primary Process
    // send to specific cluster
    indomitable.send(0, { content: { op: 'nya' } })
    .catch(console.error);
    // send to specific cluster with repliable
    indomitable.send(0, { content: { op: 'something' }, repliable: true })
    .then(console.log)
    .catch(console.error);
    // broadcast to all clusters
    indomitable.broadcast({ content: { op: 'meow' } })
    .catch(console.error);
    // broadcast to all clusters with repliable is possible as well
    indomitable.broadcast({ content: { op: 'meow' }, repliable: true })
    .then(console.log)
    .catch(console.error);

    // Worker Process (your client most likely)
    client.shard.on('message', message => {
    if (message.content.op === 'something') {
    if (!message.repliable) return;
    const someValue = doSomething();
    message.reply(someValue);
    }
    if (message.content.op === 'nya') {
    doSomething();
    }
    if (message.content.op === 'meow') {
    if (!message.repliable) return;
    message.reply('nya');
    }
    }) +
    // Primary Process
    // send to specific cluster
    indomitable.send(0, { content: { op: "nya" } }).catch(console.error);
    // send to specific cluster with repliable
    indomitable
    .send(0, { content: { op: "something" }, repliable: true })
    .then(console.log)
    .catch(console.error);
    // broadcast to all clusters
    indomitable.broadcast({ content: { op: "meow" } }).catch(console.error);
    // broadcast to all clusters with repliable is possible as well
    indomitable
    .broadcast({ content: { op: "meow" }, repliable: true })
    .then(console.log)
    .catch(console.error);

    // ClientWorker Process (your client most likely)
    client.shard.on("message", (message) => {
    if (message.content.op === "something") {
    if (!message.repliable) return;
    const someValue = doSomething();
    message.reply(someValue);
    }
    if (message.content.op === "nya") {
    doSomething();
    }
    if (message.content.op === "meow") {
    if (!message.repliable) return;
    message.reply("nya");
    }
    });

    Reconfiguring Indomitable on the go, to launch more clusters or more shard, or more on both

    -
    // Reconfigure to launch more shards based on Discord Recommendation without spawning more clusters
    indomitable.reconfigure()
    .then(() => console.log('Done, Indomitable is reconfigured'));
    // Reconfigure to launch more clusters based on your value, but leave the shards based on Discord's recommendation
    indomitable.reconfigure({ clusters: 8 })
    .then(() => console.log('Done, Indomitable is reconfigured'));
    // Reconfigure to launch more clusters or shards based on your values
    indomitable.reconfigure({ clusters: 8, shards: 8 })
    .then(() => console.log('Done, Indomitable is reconfigured'));
    // Do not run restart() or restartAll() while this is running. It will cause your cluster / clusters to restart twice.
    if (!indomitable.isBusy) indomitable.restartAll();
    // Do not use reconfigure for just restarting all clusters sequentially, still use .restartAll() for that
    indomitable.restartAll(); +
    // Reconfigure to launch more shards based on Discord Recommendation without spawning more clusters
    indomitable
    .reconfigure()
    .then(() => console.log("Done, Indomitable is reconfigured"));
    // Reconfigure to launch more clusters based on your value, but leave the shards based on Discord's recommendation
    indomitable
    .reconfigure({ clusters: 8 })
    .then(() => console.log("Done, Indomitable is reconfigured"));
    // Reconfigure to launch more clusters or shards based on your values
    indomitable
    .reconfigure({ clusters: 8, shards: 8 })
    .then(() => console.log("Done, Indomitable is reconfigured"));
    // Do not run restart() or restartAll() while this is running. It will cause your cluster / clusters to restart twice.
    if (!indomitable.isBusy) indomitable.restartAll();
    // Do not use reconfigure for just restarting all clusters sequentially, still use .restartAll() for that
    indomitable.restartAll();

    Enabling concurrency handling (across all your shards) (Read Notes Below)

    -
    const { Indomitable } = require('indomitable');
    const { Client } = require('discord.js');
    const token = 'your_token';

    const options = {
    // Processes to run
    clusterCount: 2,
    // Websocket shards to run
    shardCount: 8,
    // Discord.JS options
    clientOptions: {
    intents: [1 << 0] // Bitwise for GUILD intent only
    },
    // Auto restart processes that have been killed
    // This defaults to false by default unless you specify it
    autoRestart: true,
    // Enable max concurrency handling
    handleConcurrency: true,
    // Your Discord.JS client
    client: Client,
    // Your bot token
    token
    }

    const manager = new Indomitable(options)
    .on('error', console.error);

    manager.spawn(); +
    const { Indomitable } = require("indomitable");
    const { Client } = require("discord.js");
    const token = "your_token";

    const options = {
    // Processes to run
    clusterCount: 2,
    // Websocket shards to run
    shardCount: 8,
    // Discord.js options
    clientOptions: {
    intents: [1 << 0], // Bitwise for GUILD intent only
    },
    // Auto restart processes that have been killed
    // This defaults to false by default unless you specify it
    autoRestart: true,
    // Enable max concurrency handling
    handleConcurrency: true,
    // Your Discord.js client
    client: Client,
    // Your bot token
    token,
    };

    const manager = new Indomitable(options).on("error", console.error);

    manager.spawn();
    • Indomitable's concurrency handling will work in any shard # and cluster # regardless

      @@ -220,55 +203,4 @@

      indomitable

    None -

    Made with ❤ by @sayanyan (https://github.com/Deivu/)

    - -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Made with ❤ by @ichimakase (https://github.com/Deivu/)

    \ No newline at end of file diff --git a/docs/interfaces/Indomitable.IndomitableOptions.html b/docs/interfaces/Indomitable.IndomitableOptions.html index 6a9194b..669ca45 100644 --- a/docs/interfaces/Indomitable.IndomitableOptions.html +++ b/docs/interfaces/Indomitable.IndomitableOptions.html @@ -1,164 +1,14 @@ -IndomitableOptions | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface IndomitableOptions

    -
    -

    Options to control Indomitable behavior

    -
    -
    -
    -

    Hierarchy

    -
      -
    • IndomitableOptions
    -
    -
    -
    - -
    -
    -

    Properties

    -
    - -
    autoRestart?: boolean
    -
    - -
    client: typeof Client
    -
    - -
    clientOptions?: ClientOptions
    -
    - -
    clusterCount?: number | "auto"
    -
    - -
    clusterSettings?: ClusterSettings
    -
    - -
    handleConcurrency?: boolean
    -
    - -
    ipcTimeout?: number
    -
    - -
    shardCount?: number | "auto"
    -
    - -
    spawnDelay?: number
    -
    - -
    spawnTimeout?: number
    -
    - -
    token: string
    -
    - -
    waitForReady?: boolean
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +IndomitableOptions | indomitable

    Interface IndomitableOptions

    Options to control Indomitable behavior

    +
    interface IndomitableOptions {
        autoRestart?: boolean;
        client: typeof Client;
        clientOptions?: ClientOptions;
        clusterCount?: number | "auto";
        clusterSettings?: ClusterSettings;
        handleConcurrency?: boolean;
        ipcTimeout?: number;
        shardCount?: number | "auto";
        spawnDelay?: number;
        spawnTimeout?: number;
        token: string;
        waitForReady?: boolean;
    }

    Properties

    autoRestart?: boolean
    client: typeof Client
    clientOptions?: ClientOptions
    clusterCount?: number | "auto"
    clusterSettings?: ClusterSettings
    handleConcurrency?: boolean
    ipcTimeout?: number
    shardCount?: number | "auto"
    spawnDelay?: number
    spawnTimeout?: number
    token: string
    waitForReady?: boolean
    \ No newline at end of file diff --git a/docs/interfaces/Indomitable.ReconfigureOptions.html b/docs/interfaces/Indomitable.ReconfigureOptions.html index 4b91f1d..630cd55 100644 --- a/docs/interfaces/Indomitable.ReconfigureOptions.html +++ b/docs/interfaces/Indomitable.ReconfigureOptions.html @@ -1,90 +1,3 @@ -ReconfigureOptions | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface ReconfigureOptions

    -
    -

    Hierarchy

    -
      -
    • ReconfigureOptions
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    clusters?: number
    -
    - -
    shards?: number
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +ReconfigureOptions | indomitable

    Interface ReconfigureOptions

    interface ReconfigureOptions {
        clusters?: number;
        shards?: number;
    }

    Properties

    Properties

    clusters?: number
    shards?: number
    \ No newline at end of file diff --git a/docs/interfaces/Indomitable.ShardEventData.html b/docs/interfaces/Indomitable.ShardEventData.html index f46f920..3be52e6 100644 --- a/docs/interfaces/Indomitable.ShardEventData.html +++ b/docs/interfaces/Indomitable.ShardEventData.html @@ -1,104 +1,5 @@ -ShardEventData | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface ShardEventData

    -
    -

    Hierarchy

    -
      -
    • ShardEventData
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    clusterId: number
    -
    - -
    event?: CloseEvent
    -
    - -
    replayed?: number
    -
    - -
    shardId?: number
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +ShardEventData | indomitable

    Interface ShardEventData

    interface ShardEventData {
        clusterId: number;
        event?: CloseEvent;
        replayed?: number;
        shardId?: number;
    }

    Properties

    clusterId: number
    event?: CloseEvent
    replayed?: number
    shardId?: number
    \ No newline at end of file diff --git a/docs/interfaces/Util.AbortableData.html b/docs/interfaces/Util.AbortableData.html index 4adeeb8..df12b15 100644 --- a/docs/interfaces/Util.AbortableData.html +++ b/docs/interfaces/Util.AbortableData.html @@ -1,104 +1,4 @@ -AbortableData | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface AbortableData

    -
    -

    Hierarchy

    -
      -
    • AbortableData
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    controller: AbortController
    -
    - -
    timeout: Timeout
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +AbortableData | indomitable

    Interface AbortableData

    Data structure representing a generated abort controller instance

    +
    interface AbortableData {
        controller: AbortController;
        timeout: Timeout;
    }

    Properties

    Properties

    controller: AbortController
    timeout: Timeout
    \ No newline at end of file diff --git a/docs/interfaces/Util.ClientEventData.html b/docs/interfaces/Util.ClientEventData.html new file mode 100644 index 0000000..2feda64 --- /dev/null +++ b/docs/interfaces/Util.ClientEventData.html @@ -0,0 +1,5 @@ +ClientEventData | indomitable

    Interface ClientEventData

    Data structure representing an internal discord.js event

    +
    interface ClientEventData {
        data: any;
        internal: true;
        op: ClientEvents;
    }

    Properties

    Properties

    data: any
    internal: true
    \ No newline at end of file diff --git a/docs/interfaces/Util.InternalAbortSignal.html b/docs/interfaces/Util.InternalAbortSignal.html index 1fc26f4..1d315fb 100644 --- a/docs/interfaces/Util.InternalAbortSignal.html +++ b/docs/interfaces/Util.InternalAbortSignal.html @@ -1,112 +1,4 @@ -InternalAbortSignal | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface InternalAbortSignal

    -
    -

    Hierarchy

    -
      -
    • InternalAbortSignal
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    listener: (() => void)
    -
    -

    Type declaration

    -
      -
    • -
        -
      • (): void
      • -
      • -

        Returns void

    -
    - -
    signal: AbortSignal
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +InternalAbortSignal | indomitable

    Interface InternalAbortSignal

    Data structure representing an internal abort data

    +
    interface InternalAbortSignal {
        listener: (() => void);
        signal: AbortSignal;
    }

    Properties

    Properties

    listener: (() => void)

    Type declaration

      • (): void
      • Returns void

    signal: AbortSignal
    \ No newline at end of file diff --git a/docs/interfaces/Util.InternalError.html b/docs/interfaces/Util.InternalError.html deleted file mode 100644 index d786cb7..0000000 --- a/docs/interfaces/Util.InternalError.html +++ /dev/null @@ -1,129 +0,0 @@ -InternalError | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface InternalError

    -
    -

    Data structure representing an internal error

    -
    -
    -
    -

    Hierarchy

    -
      -
    • InternalError
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    error: true
    -
    - -
    internal: true
    -
    - -
    name: string
    -
    - -
    reason: string
    -
    - -
    stack: string
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/interfaces/Util.InternalEvents.html b/docs/interfaces/Util.InternalEvents.html deleted file mode 100644 index 5edb1bc..0000000 --- a/docs/interfaces/Util.InternalEvents.html +++ /dev/null @@ -1,115 +0,0 @@ -InternalEvents | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface InternalEvents

    -
    -

    Data structure representing an internal event

    -
    -
    -
    -

    Hierarchy

    -
      -
    • InternalEvents
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    data: any
    -
    - -
    internal: true
    -
    - -
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/interfaces/Util.InternalOpsData.html b/docs/interfaces/Util.InternalOpsData.html new file mode 100644 index 0000000..2ddbecf --- /dev/null +++ b/docs/interfaces/Util.InternalOpsData.html @@ -0,0 +1,5 @@ +InternalOpsData | indomitable

    Interface InternalOpsData

    Data structure representing an internal event

    +
    interface InternalOpsData {
        data: any;
        internal: true;
        op: InternalOps;
    }

    Properties

    Properties

    data: any
    internal: true
    \ No newline at end of file diff --git a/docs/interfaces/Util.InternalPromise.html b/docs/interfaces/Util.InternalPromise.html index ef2655b..9d7fe0d 100644 --- a/docs/interfaces/Util.InternalPromise.html +++ b/docs/interfaces/Util.InternalPromise.html @@ -1,115 +1,5 @@ -InternalPromise | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface InternalPromise

    -
    -

    Internal promise data tracking

    -
    -
    -
    -

    Hierarchy

    -
      -
    • InternalPromise
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    controller?: InternalAbortSignal
    -
    - -
    reject: Function
    -
    - -
    resolve: Function
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +InternalPromise | indomitable

    Interface InternalPromise

    Internal promise data tracking

    +
    interface InternalPromise {
        controller?: InternalAbortSignal;
        reject: Function;
        resolve: Function;
    }

    Properties

    Properties

    controller?: InternalAbortSignal
    reject: Function
    resolve: Function
    \ No newline at end of file diff --git a/docs/interfaces/Util.IpcErrorData.html b/docs/interfaces/Util.IpcErrorData.html new file mode 100644 index 0000000..0905961 --- /dev/null +++ b/docs/interfaces/Util.IpcErrorData.html @@ -0,0 +1,5 @@ +IpcErrorData | indomitable

    Interface IpcErrorData

    Data structure representing an internal error

    +
    interface IpcErrorData {
        name: string;
        reason: string;
        stack: string;
    }

    Properties

    Properties

    name: string
    reason: string
    stack: string
    \ No newline at end of file diff --git a/docs/interfaces/Util.MainStrategyData.html b/docs/interfaces/Util.MainStrategyData.html new file mode 100644 index 0000000..2a171d0 --- /dev/null +++ b/docs/interfaces/Util.MainStrategyData.html @@ -0,0 +1,5 @@ +MainStrategyData | indomitable

    Interface MainStrategyData

    Type for raw ipc messages of cluster -> thread

    +
    interface MainStrategyData {
        data: any;
        internal: true;
        op: MainStrategyOps;
    }

    Properties

    Properties

    data: any
    internal: true
    \ No newline at end of file diff --git a/docs/interfaces/Util.Message.html b/docs/interfaces/Util.Message.html index 774cc3c..32adfa4 100644 --- a/docs/interfaces/Util.Message.html +++ b/docs/interfaces/Util.Message.html @@ -1,128 +1,5 @@ -Message | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface Message

    -
    -

    Data structure representing an IPC message

    -
    -
    -
    -

    Hierarchy

    -
      -
    • Message
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    content: any
    -
    - -
    repliable: boolean
    -
    - -
    reply: ((data) => void)
    -
    -

    Type declaration

    -
      -
    • -
        -
      • (data): void
      • -
      • -
        -

        Parameters

        -
          -
        • -
          data: any
        -

        Returns void

    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +Message | indomitable

    Interface Message

    Data structure representing an IPC message

    +
    interface Message {
        content: any;
        repliable: boolean;
        reply: ((data) => void);
    }

    Properties

    Properties

    content: any
    repliable: boolean
    reply: ((data) => void)

    Type declaration

      • (data): void
      • Parameters

        • data: any

        Returns void

    \ No newline at end of file diff --git a/docs/interfaces/Util.RawIpcMessage.html b/docs/interfaces/Util.RawIpcMessage.html index 2a31037..ad72823 100644 --- a/docs/interfaces/Util.RawIpcMessage.html +++ b/docs/interfaces/Util.RawIpcMessage.html @@ -1,122 +1,6 @@ -RawIpcMessage | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface RawIpcMessage

    -
    -

    Data structure representing internal IPC data

    -
    -
    -
    -

    Hierarchy

    -
      -
    • RawIpcMessage
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    content: any
    -
    - -
    id: null | string
    -
    - -
    internal: true
    -
    - -
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +RawIpcMessage | indomitable

    Interface RawIpcMessage

    Data structure representing internal IPC data

    +
    interface RawIpcMessage {
        content: any;
        id: null | string;
        internal: true;
        type: RawIpcMessageType;
    }

    Properties

    Properties

    content: any
    id: null | string
    internal: true
    \ No newline at end of file diff --git a/docs/interfaces/Util.SavePromiseOptions.html b/docs/interfaces/Util.SavePromiseOptions.html index 57154e7..613e269 100644 --- a/docs/interfaces/Util.SavePromiseOptions.html +++ b/docs/interfaces/Util.SavePromiseOptions.html @@ -1,144 +1,5 @@ -SavePromiseOptions | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface SavePromiseOptions

    -
    -

    Hierarchy

    -
      -
    • SavePromiseOptions
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    id: string
    -
    - -
    reject: ((reason) => void)
    -
    -

    Type declaration

    -
      -
    • -
        -
      • (reason): void
      • -
      • -
        -

        Parameters

        -
          -
        • -
          reason: unknown
        -

        Returns void

    -
    - -
    resolve: ((data) => void)
    -
    -

    Type declaration

    -
      -
    • -
        -
      • (data): void
      • -
      • -
        -

        Parameters

        -
          -
        • -
          data: unknown
        -

        Returns void

    -
    - -
    signal?: AbortSignal
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +SavePromiseOptions | indomitable

    Interface SavePromiseOptions

    interface SavePromiseOptions {
        id: string;
        reject: ((reason) => void);
        resolve: ((data) => void);
        signal?: AbortSignal;
    }

    Properties

    Properties

    id: string
    reject: ((reason) => void)

    Type declaration

      • (reason): void
      • Parameters

        • reason: unknown

        Returns void

    resolve: ((data) => void)

    Type declaration

      • (data): void
      • Parameters

        • data: unknown

        Returns void

    signal?: AbortSignal
    \ No newline at end of file diff --git a/docs/interfaces/Util.SessionObject.html b/docs/interfaces/Util.SessionObject.html index d7d85af..981cb80 100644 --- a/docs/interfaces/Util.SessionObject.html +++ b/docs/interfaces/Util.SessionObject.html @@ -1,126 +1,5 @@ -SessionObject | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface SessionObject

    -
    -

    Data structure representing a Discord session

    -
    -
    -
    -

    Hierarchy

    -
      -
    • SessionObject
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    session_start_limit: {
        max_concurrency: number;
        remaining: number;
        reset_after: number;
        total: number;
    }
    -
    -

    Type declaration

    -
      -
    • -
      max_concurrency: number
    • -
    • -
      remaining: number
    • -
    • -
      reset_after: number
    • -
    • -
      total: number
    -
    - -
    shards: number
    -
    - -
    url: string
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +SessionObject | indomitable

    Interface SessionObject

    Data structure representing a Discord session

    +
    interface SessionObject {
        session_start_limit: {
            max_concurrency: number;
            remaining: number;
            reset_after: number;
            total: number;
        };
        shards: number;
        url: string;
    }

    Properties

    session_start_limit: {
        max_concurrency: number;
        remaining: number;
        reset_after: number;
        total: number;
    }

    Type declaration

    • max_concurrency: number
    • remaining: number
    • reset_after: number
    • total: number
    shards: number
    url: string
    \ No newline at end of file diff --git a/docs/interfaces/Util.ThreadStrategyData.html b/docs/interfaces/Util.ThreadStrategyData.html new file mode 100644 index 0000000..3995350 --- /dev/null +++ b/docs/interfaces/Util.ThreadStrategyData.html @@ -0,0 +1,7 @@ +ThreadStrategyData | indomitable

    Interface ThreadStrategyData

    Type for raw ipc messages of cluster <- thread

    +
    interface ThreadStrategyData {
        data: any;
        event: WebSocketShardEvents;
        internal: true;
        op: ThreadStrategyOps;
        shardId: number;
    }

    Properties

    Properties

    data: any
    event: WebSocketShardEvents
    internal: true
    shardId: number
    \ No newline at end of file diff --git a/docs/interfaces/Util.Transportable.html b/docs/interfaces/Util.Transportable.html index 1281b6f..7b5531d 100644 --- a/docs/interfaces/Util.Transportable.html +++ b/docs/interfaces/Util.Transportable.html @@ -1,115 +1,5 @@ -Transportable | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface Transportable

    -
    -

    Data structure representing IPC data

    -
    -
    -
    -

    Hierarchy

    -
      -
    • Transportable
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    content: any
    -
    - -
    repliable?: boolean
    -
    - -
    signal?: AbortSignal
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +Transportable | indomitable

    Interface Transportable

    Data structure representing IPC data

    +
    interface Transportable {
        content: any;
        repliable?: boolean;
        signal?: AbortSignal;
    }

    Properties

    Properties

    content: any
    repliable?: boolean
    signal?: AbortSignal
    \ No newline at end of file diff --git a/docs/interfaces/client_ShardClient.PartialInternalEvents.html b/docs/interfaces/client_ShardClient.PartialInternalEvents.html index 793c1c3..46e90f9 100644 --- a/docs/interfaces/client_ShardClient.PartialInternalEvents.html +++ b/docs/interfaces/client_ShardClient.PartialInternalEvents.html @@ -1,101 +1,3 @@ -PartialInternalEvents | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface PartialInternalEvents

    -
    -

    Hierarchy

    -
      -
    • PartialInternalEvents
    -
    -
    -
    - -
    -
    -

    Properties

    -
    data -op -
    -
    -

    Properties

    -
    - -
    data: {
        clusterId: number;
        event?: CloseEvent;
        ipcId?: string;
        replayed?: number;
        shardId?: number;
    }
    -
    -

    Type declaration

    -
      -
    • -
      clusterId: number
    • -
    • -
      Optional event?: CloseEvent
    • -
    • -
      Optional ipcId?: string
    • -
    • -
      Optional replayed?: number
    • -
    • -
      Optional shardId?: number
    -
    - -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +PartialInternalEvents | indomitable
    interface PartialInternalEvents {
        data: {
            clusterId: number;
            event?: CloseEvent;
            ipcId?: string;
            replayed?: number;
            shardId?: number;
        };
        op: ClientEvents;
    }

    Properties

    data +op +

    Properties

    data: {
        clusterId: number;
        event?: CloseEvent;
        ipcId?: string;
        replayed?: number;
        shardId?: number;
    }

    Type declaration

    • clusterId: number
    • Optional event?: CloseEvent
    • Optional ipcId?: string
    • Optional replayed?: number
    • Optional shardId?: number
    \ No newline at end of file diff --git a/docs/interfaces/manager_ClusterManager.ClusterManagerOptions.html b/docs/interfaces/manager_ClusterManager.ClusterManagerOptions.html index ee5eda0..b5c23e4 100644 --- a/docs/interfaces/manager_ClusterManager.ClusterManagerOptions.html +++ b/docs/interfaces/manager_ClusterManager.ClusterManagerOptions.html @@ -1,99 +1,5 @@ -ClusterManagerOptions | indomitable
    -
    - -
    -
    -
    -
    - -

    Interface ClusterManagerOptions

    -
    -

    Options for child processes

    -
    -
    -
    -

    Hierarchy

    -
      -
    • ClusterManagerOptions
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    id: number
    -
    - -
    manager: Indomitable
    -
    - -
    shards: number[]
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +ClusterManagerOptions | indomitable

    Options for child processes

    +
    interface ClusterManagerOptions {
        id: number;
        manager: Indomitable;
        shards: number[];
    }

    Properties

    Properties

    id: number
    manager: Indomitable
    shards: number[]
    \ No newline at end of file diff --git a/docs/modules/Indomitable.html b/docs/modules/Indomitable.html index 2520afd..3490377 100644 --- a/docs/modules/Indomitable.html +++ b/docs/modules/Indomitable.html @@ -1,70 +1,5 @@ -Indomitable | indomitable
    -
    - -
    -
    -
    -
    - -

    Module Indomitable

    -
    -
    -

    Index

    -
    -

    Classes

    -
    -
    -

    Interfaces

    -
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +Indomitable | indomitable
    \ No newline at end of file diff --git a/docs/modules/Util.html b/docs/modules/Util.html index 79f6223..393e3c6 100644 --- a/docs/modules/Util.html +++ b/docs/modules/Util.html @@ -1,101 +1,26 @@ -Util | indomitable
    -
    - -
    - -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +Util | indomitable
    \ No newline at end of file diff --git a/docs/modules/client_ShardClient.html b/docs/modules/client_ShardClient.html index 8e31ed8..ac2a9cb 100644 --- a/docs/modules/client_ShardClient.html +++ b/docs/modules/client_ShardClient.html @@ -1,66 +1,3 @@ -client/ShardClient | indomitable
    -
    - -
    -
    -
    -
    - -

    Module client/ShardClient

    -
    -
    -

    Index

    -
    -

    Classes

    -
    -
    -

    Interfaces

    -
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +client/ShardClient | indomitable

    Module client/ShardClient

    Index

    Classes

    Interfaces

    \ No newline at end of file diff --git a/docs/modules/client_ShardClientUtil.html b/docs/modules/client_ShardClientUtil.html index 27bed20..80075af 100644 --- a/docs/modules/client_ShardClientUtil.html +++ b/docs/modules/client_ShardClientUtil.html @@ -1,61 +1,2 @@ -client/ShardClientUtil | indomitable
    -
    - -
    -
    -
    -
    - -

    Module client/ShardClientUtil

    -
    -
    -

    Index

    -
    -

    Classes

    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +client/ShardClientUtil | indomitable

    Module client/ShardClientUtil

    Index

    Classes

    \ No newline at end of file diff --git a/docs/modules/concurrency_ConcurrencyClient.html b/docs/modules/concurrency_ConcurrencyClient.html index 9faaaf2..2cd8498 100644 --- a/docs/modules/concurrency_ConcurrencyClient.html +++ b/docs/modules/concurrency_ConcurrencyClient.html @@ -1,61 +1,2 @@ -concurrency/ConcurrencyClient | indomitable
    -
    - -
    -
    -
    -
    - -

    Module concurrency/ConcurrencyClient

    -
    -
    -

    Index

    -
    -

    Classes

    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +concurrency/ConcurrencyClient | indomitable

    Module concurrency/ConcurrencyClient

    Index

    Classes

    \ No newline at end of file diff --git a/docs/modules/concurrency_ConcurrencyManager.html b/docs/modules/concurrency_ConcurrencyManager.html index f735c9c..9857227 100644 --- a/docs/modules/concurrency_ConcurrencyManager.html +++ b/docs/modules/concurrency_ConcurrencyManager.html @@ -1,61 +1,2 @@ -concurrency/ConcurrencyManager | indomitable
    -
    - -
    -
    -
    -
    - -

    Module concurrency/ConcurrencyManager

    -
    -
    -

    Index

    -
    -

    Classes

    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +concurrency/ConcurrencyManager | indomitable
    \ No newline at end of file diff --git a/docs/modules/ipc_BaseIpc.html b/docs/modules/ipc_BaseIpc.html index ee12574..f3c69f2 100644 --- a/docs/modules/ipc_BaseIpc.html +++ b/docs/modules/ipc_BaseIpc.html @@ -1,61 +1,2 @@ -ipc/BaseIpc | indomitable
    -
    - -
    -
    -
    -
    - -

    Module ipc/BaseIpc

    -
    -
    -

    Index

    -
    -

    Classes

    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +ipc/BaseIpc | indomitable

    Module ipc/BaseIpc

    Index

    Classes

    \ No newline at end of file diff --git a/docs/modules/ipc_BaseWorker.html b/docs/modules/ipc_BaseWorker.html new file mode 100644 index 0000000..d9de886 --- /dev/null +++ b/docs/modules/ipc_BaseWorker.html @@ -0,0 +1,2 @@ +ipc/BaseWorker | indomitable

    Module ipc/BaseWorker

    Index

    Classes

    \ No newline at end of file diff --git a/docs/modules/ipc_ClientWorker.html b/docs/modules/ipc_ClientWorker.html new file mode 100644 index 0000000..1e3a145 --- /dev/null +++ b/docs/modules/ipc_ClientWorker.html @@ -0,0 +1,2 @@ +ipc/ClientWorker | indomitable

    Module ipc/ClientWorker

    Index

    Classes

    \ No newline at end of file diff --git a/docs/modules/ipc_Main.html b/docs/modules/ipc_Main.html deleted file mode 100644 index cb239f6..0000000 --- a/docs/modules/ipc_Main.html +++ /dev/null @@ -1,61 +0,0 @@ -ipc/Main | indomitable
    -
    - -
    -
    -
    -
    - -

    Module ipc/Main

    -
    -
    -

    Index

    -
    -

    Classes

    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/modules/ipc_MainWorker.html b/docs/modules/ipc_MainWorker.html new file mode 100644 index 0000000..1a3b749 --- /dev/null +++ b/docs/modules/ipc_MainWorker.html @@ -0,0 +1,2 @@ +ipc/MainWorker | indomitable

    Module ipc/MainWorker

    Index

    Classes

    \ No newline at end of file diff --git a/docs/modules/ipc_Worker.html b/docs/modules/ipc_Worker.html deleted file mode 100644 index a61f42a..0000000 --- a/docs/modules/ipc_Worker.html +++ /dev/null @@ -1,61 +0,0 @@ -ipc/Worker | indomitable
    -
    - -
    -
    -
    -
    - -

    Module ipc/Worker

    -
    -
    -

    Index

    -
    -

    Classes

    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/modules/manager_ClusterManager.html b/docs/modules/manager_ClusterManager.html index 41e704c..e068696 100644 --- a/docs/modules/manager_ClusterManager.html +++ b/docs/modules/manager_ClusterManager.html @@ -1,66 +1,3 @@ -manager/ClusterManager | indomitable
    -
    - -
    -
    -
    -
    - -

    Module manager/ClusterManager

    -
    -
    -

    Index

    -
    -

    Classes

    -
    -
    -

    Interfaces

    -
    -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +manager/ClusterManager | indomitable

    Module manager/ClusterManager

    Index

    Classes

    Interfaces

    \ No newline at end of file diff --git a/docs/variables/Util.EnvProcessData.html b/docs/variables/Util.EnvProcessData.html new file mode 100644 index 0000000..8e7c365 --- /dev/null +++ b/docs/variables/Util.EnvProcessData.html @@ -0,0 +1,2 @@ +EnvProcessData | indomitable

    Variable EnvProcessDataConst

    EnvProcessData: {
        clusterCount: number;
        clusterId: number;
        shardCount: number;
        shardIds: number[];
    } = ...

    Hoisted Environmental Variable for ease of fetching

    +

    Type declaration

    • clusterCount: number
    • clusterId: number
    • shardCount: number
    • shardIds: number[]
    \ No newline at end of file diff --git a/index.ts b/index.ts index 842147c..f2b3f65 100644 --- a/index.ts +++ b/index.ts @@ -5,10 +5,6 @@ export * from './src/ipc/BaseIpc'; export * from './src/ipc/MainWorker'; export * from './src/ipc/BaseWorker'; export * from './src/ipc/ClientWorker'; -export * from './src/ipc/MainStrategyWorker'; -export * from './src/ipc/ThreadStrategyWorker'; export * from './src/manager/ClusterManager'; -export * from './src/strategy/IndomitableFetchingStrategy'; -export * from './src/strategy/IndomitableStrategy'; export * from './src/Indomitable'; export * as Utils from './src/Util'; diff --git a/package.json b/package.json index 306bcda..6762808 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "indomitable", - "version": "4.1.0", - "description": "A lightweight (the actual ship is heavy though), performant, and powerful sharder for Discord.JS", + "version": "4.2.0", + "description": "A lightweight (the actual ship is heavy though) no depedencies, performant, and powerful sharder for Discord.JS", "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", @@ -44,21 +44,17 @@ }, "homepage": "https://github.com/Deivu/Indomitable#readme", "peerDependencies": { - "@discordjs/ws": ">=1.0.x", "discord.js": ">=14.14.x" }, "devDependencies": { - "@augu/eslint-config": "^5.0.0", - "@types/node": "^20.10.5", + "@augu/eslint-config": "^5.2.1", + "@types/node": "^20.12.7", "@types/ws": "^8.5.10", - "@typescript-eslint/eslint-plugin": "^6.15.0", - "@typescript-eslint/parser": "^6.15.0", + "@typescript-eslint/eslint-plugin": "^7.7.0", + "@typescript-eslint/parser": "^7.7.0", "eslint": "^8.56.0", - "tsup": "^8.0.1", - "typedoc": "^0.25.4", - "typescript": "^5.3.3" - }, - "dependencies": { - "@discordjs/collection": "^2.0.0" + "tsup": "^8.0.2", + "typedoc": "^0.25.13", + "typescript": "^5.4.5" } } diff --git a/src/client/ShardClient.ts b/src/client/ShardClient.ts index 95f8f73..c89ceaf 100644 --- a/src/client/ShardClient.ts +++ b/src/client/ShardClient.ts @@ -1,9 +1,9 @@ import type { Client, ClientOptions as DiscordJsClientOptions } from 'discord.js'; import { Indomitable } from '../Indomitable'; import { EnvProcessData, ClientEvents, ClientEventData } from '../Util'; -import { IndomitableStrategy } from '../strategy/IndomitableStrategy'; import { ShardClientUtil } from './ShardClientUtil'; import { BaseWorker } from '../ipc/BaseWorker'; +import { ConcurrencyClient } from '../concurrency/ConcurrencyClient'; export interface PartialInternalEvents { op: ClientEvents, @@ -21,8 +21,8 @@ export class ShardClient { clientOptions.shardCount = EnvProcessData.shardCount; if (manager.handleConcurrency) { if (!clientOptions.ws) clientOptions.ws = {}; - if (!clientOptions.ws.buildStrategy) clientOptions.ws.buildStrategy = ws => new IndomitableStrategy(ws, new BaseWorker()); - } + clientOptions.ws.buildIdentifyThrottler = () => Promise.resolve(new ConcurrencyClient(new BaseWorker())); + } this.client = new manager.client(clientOptions); // @ts-expect-error: Override shard client util with indomitable shard client util this.client.shard = new ShardClientUtil(this.client, manager); @@ -30,7 +30,7 @@ export class ShardClient { } public async start(token: string): Promise { - // attach listeners + // attach listeners this.client.once('ready', () => this.send({ op: ClientEvents.READY, data: { clusterId: this.clusterId }})); this.client.on('shardReady', (shardId: number) => this.send({ op: ClientEvents.SHARD_READY, data: { clusterId: this.clusterId, shardId }})); this.client.on('shardReconnecting', (shardId: number) => this.send({ op: ClientEvents.SHARD_RECONNECT, data: { clusterId: this.clusterId, shardId }})); diff --git a/src/concurrency/ConcurrencyClient.ts b/src/concurrency/ConcurrencyClient.ts new file mode 100644 index 0000000..1e33877 --- /dev/null +++ b/src/concurrency/ConcurrencyClient.ts @@ -0,0 +1,44 @@ +import { InternalOps, InternalOpsData } from '../Util'; +import { BaseWorker } from '../ipc/BaseWorker'; + +/** + * Internal class that is passed to @discordjs/ws to handle concurrency + */ +export class ConcurrencyClient { + private ipc: BaseWorker; + constructor(ipc: BaseWorker) { + this.ipc = ipc; + } + + /** + * Method to try and acquire a lock for identify + */ + public async waitForIdentify(shardId: number, signal: AbortSignal): Promise { + const content: InternalOpsData = { + op: InternalOps.REQUEST_IDENTIFY, + data: { shardId }, + internal: true + }; + const listener = () => this.abortIdentify(shardId); + try { + signal.addEventListener('abort', listener); + await this.ipc.send({ content, repliable: true }); + } finally { + signal.removeEventListener('abort', listener); + } + } + + /** + * Aborts an acquire lock request + */ + private abortIdentify(shardId: number): void { + const content: InternalOpsData = { + op: InternalOps.CANCEL_IDENTIFY, + data: { shardId }, + internal: true + }; + this.ipc + .send({ content, repliable: false }) + .catch(() => null); + } +} \ No newline at end of file diff --git a/src/ipc/MainStrategyWorker.ts b/src/ipc/MainStrategyWorker.ts deleted file mode 100644 index 4009fa2..0000000 --- a/src/ipc/MainStrategyWorker.ts +++ /dev/null @@ -1,62 +0,0 @@ -import EventEmitter from 'node:events'; -import { Worker } from 'node:worker_threads'; -import { BaseIpc } from './BaseIpc'; -import { InternalOps, InternalOpsData, Message, RawIpcMessage, ThreadStrategyData, ThreadStrategyOps } from '../Util'; -import { IndomitableStrategy } from '../strategy/IndomitableStrategy'; - -export class MainStrategyWorker extends BaseIpc { - public readonly id: number; - public readonly thread: Worker; - public readonly strategy: IndomitableStrategy; - constructor(id: number, thread: Worker, strategy: IndomitableStrategy) { - super(new EventEmitter()); - this.id = id; - this.thread = thread; - this.strategy = strategy; - } - - protected available(): boolean { - return true; - } - - protected sendData(data: RawIpcMessage) { - return this.thread.postMessage(data); - } - - protected async handleMessage(message: Message): Promise { - const content = message.content as ThreadStrategyData; - switch(content.op) { - case ThreadStrategyOps.SHARD_EVENT: - this.strategy.manager.emit(content.event, { ...content.data, shardId: content.shardId }); - break; - case ThreadStrategyOps.REQUEST_IDENTIFY: { - const request: InternalOpsData = { - op: InternalOps.REQUEST_IDENTIFY, - data: { shardId: content.data.shardId }, - internal: true - }; - await this.strategy.ipc.send({ content: request, repliable: true }); - message.reply(null); - break; - } - case ThreadStrategyOps.CANCEL_IDENTIFY: { - const request: InternalOpsData = { - op: InternalOps.CANCEL_IDENTIFY, - data: { shardId: content.data.shardId }, - internal: true - }; - await this.strategy.ipc.send({ content: request }); - message.reply(null); - break; - } - case ThreadStrategyOps.RETRIEVE_SESSION: { - const session = await this.strategy.manager.options.retrieveSessionInfo(content.data.shardId); - message.reply(session); - break; - } - case ThreadStrategyOps.UPDATE_SESSION: - await this.strategy.manager.options.updateSessionInfo(content.data.shardId, content.data.sessionInfo); - break; - } - } -} diff --git a/src/ipc/ThreadStrategyWorker.ts b/src/ipc/ThreadStrategyWorker.ts deleted file mode 100644 index 91cd669..0000000 --- a/src/ipc/ThreadStrategyWorker.ts +++ /dev/null @@ -1,56 +0,0 @@ -import EventEmitter from 'node:events'; -import { parentPort } from 'worker_threads'; -import { WebSocketShard } from '@discordjs/ws'; -import { BaseIpc } from './BaseIpc'; -import { - MainStrategyData, - MainStrategyOps, - Message, - RawIpcMessage, -} from '../Util'; - -export class ThreadStrategyWorker extends BaseIpc { - private shard: WebSocketShard|undefined; - constructor() { - super(new EventEmitter()); - parentPort!.on('message', message => this.handleRawResponse(message, () => null)); - } - - public build(shard: WebSocketShard): void { - if (!this.shard) this.shard = shard; - } - - protected available(): boolean { - return !!parentPort; - } - - protected sendData(data: RawIpcMessage) { - return parentPort!.postMessage(data); - } - - protected async handleMessage(message: Message): Promise { - const content = message.content as MainStrategyData; - if (!this.shard) throw new Error('Shard isn\'t initialized yet'); - switch(content.op) { - case MainStrategyOps.CONNECT: - await this.shard.connect(); - message.reply(null); - break; - case MainStrategyOps.DESTROY: - await this.shard.destroy(content.data || {}); - message.reply(null); - break; - case MainStrategyOps.SEND: - await this.shard.send(content.data || {}); - message.reply(null); - break; - case MainStrategyOps.RECONNECT: - await this.shard.destroy(content.data); - message.reply(null); - break; - case MainStrategyOps.STATUS: - message.reply(this.shard.status); - break; - } - } -} diff --git a/src/strategy/IndomitableFetchingStrategy.ts b/src/strategy/IndomitableFetchingStrategy.ts deleted file mode 100644 index 92445e0..0000000 --- a/src/strategy/IndomitableFetchingStrategy.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { FetchingStrategyOptions, IContextFetchingStrategy, SessionInfo, WebSocketShardEvents } from '@discordjs/ws'; -import { ThreadStrategyWorker } from '../ipc/ThreadStrategyWorker'; -import { ThreadStrategyData, ThreadStrategyOps } from '../Util'; - -export class IndomitableFetchingStrategy implements IContextFetchingStrategy { - private readonly ipc: ThreadStrategyWorker; - public readonly options: FetchingStrategyOptions; - constructor(ipc: ThreadStrategyWorker, options: FetchingStrategyOptions) { - this.ipc = ipc; - this.options = options; - } - - public async retrieveSessionInfo(shardId: number): Promise { - const content: ThreadStrategyData = { - op: ThreadStrategyOps.RETRIEVE_SESSION, - event: WebSocketShardEvents.Ready, - data: { shardId }, - shardId: shardId, - internal: true - }; - return await this.ipc.send({ content, repliable: true }) as SessionInfo; - } - - public async updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): Promise { - const content: ThreadStrategyData = { - op: ThreadStrategyOps.UPDATE_SESSION, - event: WebSocketShardEvents.Ready, - data: { shardId, sessionInfo }, - shardId: shardId, - internal: true - }; - await this.ipc.send({ content }); - } - - public async waitForIdentify(shardId: number, signal: AbortSignal): Promise { - const content: ThreadStrategyData = { - op: ThreadStrategyOps.REQUEST_IDENTIFY, - event: WebSocketShardEvents.Ready, - data: { shardId }, - shardId: shardId, - internal: true - }; - const listener = () => this.abortIdentify(shardId); - try { - signal.addEventListener('abort', listener); - await this.ipc.send({ content, repliable: true }); - } finally { - signal.removeEventListener('abort', listener); - } - } - - private abortIdentify(shardId: number): void { - const content: ThreadStrategyData = { - op: ThreadStrategyOps.CANCEL_IDENTIFY, - event: WebSocketShardEvents.Ready, - data: { shardId }, - shardId: shardId, - internal: true - }; - this.ipc - .send({ content, repliable: false }) - .catch(() => null); - } -} diff --git a/src/strategy/IndomitableStrategy.ts b/src/strategy/IndomitableStrategy.ts deleted file mode 100644 index 0a1d689..0000000 --- a/src/strategy/IndomitableStrategy.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { join } from 'node:path'; -import { once } from 'node:events'; -import { Worker, WorkerOptions, ResourceLimits } from 'node:worker_threads'; -import { - FetchingStrategyOptions, - IShardingStrategy, - managerToFetchingStrategyOptions, - WebSocketManager, - WebSocketShardDestroyOptions, - WebSocketShardDestroyRecovery, - WebSocketShardStatus -} from '@discordjs/ws'; -import { Collection } from '@discordjs/collection'; -import { MainStrategyData, MainStrategyOps } from '../Util'; -import { MainStrategyWorker } from '../ipc/MainStrategyWorker'; -import { BaseWorker } from '../ipc/BaseWorker'; - -export interface WorkerData extends FetchingStrategyOptions { - shardId: number; -} - -export interface IndomitableWorker { - thread: Worker; - ipc: MainStrategyWorker; -} - -export interface IndomitableStrategyOptions { - path?: string; - resourceLimits?: ResourceLimits; -} - -export class IndomitableStrategy implements IShardingStrategy { - public readonly manager: WebSocketManager; - public readonly ipc: BaseWorker; - public readonly workers: Collection; - private readonly options: IndomitableStrategyOptions; - constructor(manager: WebSocketManager, ipc: BaseWorker, options: IndomitableStrategyOptions = {}) { - this.manager = manager; - this.ipc = ipc; - this.workers = new Collection(); - this.options = options; - } - - public async spawn(shardIds: number[]): Promise { - const strategyOptions = await managerToFetchingStrategyOptions(this.manager); - const promises = shardIds.map(shardId => this.createWorker(shardId, { ...strategyOptions, shardId })); - await Promise.all(promises); - } - - public async connect(): Promise { - const promises = []; - for (const worker of this.workers.values()) { - const content: MainStrategyData = { - op: MainStrategyOps.CONNECT, - data: {}, - internal: true - }; - promises.push(worker.ipc.send({ content, repliable: true })); - } - await Promise.all(promises); - } - - public async destroy(data: Omit = {}): Promise { - const promises = []; - for (const worker of this.workers.values()) { - const content: MainStrategyData = { - op: MainStrategyOps.DESTROY, - data, - internal: true - }; - promises.push(worker.ipc.send({ content, repliable: true })); - } - await Promise.all(promises); - } - - public async reconnect(shardId: number): Promise { - const worker = this.workers.get(shardId); - if (!worker) - throw new Error(`No worker found for shard #${shardId}`); - const content: MainStrategyData = { - op: MainStrategyOps.RECONNECT, - data: { recover: WebSocketShardDestroyRecovery.Reconnect } as WebSocketShardDestroyOptions, - internal: true - }; - await worker.ipc.send({ content, repliable: true }); - } - - public async send(shardId: number, data: any): Promise { - const worker = this.workers.get(shardId); - if (!worker) - throw new Error(`No worker found for shard #${shardId}`); - const content: MainStrategyData = { - op: MainStrategyOps.SEND, - data, - internal: true - }; - await worker.ipc.send({ content, repliable: true }); - } - - public async fetchStatus(): Promise> { - const collection: Collection = new Collection(); - const promises = this.workers.map(async (worker, id) => { - const content: MainStrategyData = { - op: MainStrategyOps.STATUS, - data: {}, - internal: true - }; - const status = await worker.ipc.send({ content, repliable: true }); - collection.set(id, status as WebSocketShardStatus); - }); - await Promise.all(promises); - return collection; - } - - private async createWorker(shardId: number, workerData: WorkerData): Promise { - const path = this.options.path || join(__dirname, 'src/strategy/', 'Thread.js'); - const options: WorkerOptions = { workerData }; - if (this.options.resourceLimits) - options.resourceLimits = this.options.resourceLimits; - const thread = new Worker(path, options); - await once(thread, 'online'); - const ipc = new MainStrategyWorker(shardId, thread, this); - thread - .on('error', error => { - throw error; - }) - .on('message', message => ipc.handleRawResponse(message, () => null)); - this.workers.set(shardId, { thread, ipc }); - return thread; - } -} diff --git a/src/strategy/Thread.ts b/src/strategy/Thread.ts deleted file mode 100644 index 3dec08f..0000000 --- a/src/strategy/Thread.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { WebSocketShard, WebSocketShardEvents } from '@discordjs/ws'; -import { workerData } from 'worker_threads'; -import { WorkerData } from './IndomitableStrategy'; -import { IndomitableFetchingStrategy } from './IndomitableFetchingStrategy'; -import { ThreadStrategyWorker } from '../ipc/ThreadStrategyWorker'; -import { ThreadStrategyData, ThreadStrategyOps } from '../Util'; - -const options = workerData as WorkerData; - -const ipc = new ThreadStrategyWorker(); -const strategy = new IndomitableFetchingStrategy(ipc, options); -const shard = new WebSocketShard(strategy, options.shardId); - -ipc.build(shard); - -for (const event of Object.values(WebSocketShardEvents)) { - // @ts-expect-error: unknown fix - shard.on(event, data => { - const content: ThreadStrategyData = { - op: ThreadStrategyOps.SHARD_EVENT, - event, - data, - shardId: shard.id, - internal: true - }; - ipc.send({ content }) - .catch(() => null); - }); -} - - - - -