@brown-ds/distribution 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- function comm(_0x3ff307){const _0x27d376={};_0x27d376['gid']=_0x3ff307['gid']||'global';function _0x3a6af3(_0x2830e3,_0x55cfbd,_0xeaadfb){global['distributi'+'on']['local']['groups']['get'](_0x27d376['gid'],(_0x1ac991,_0x38d838)=>{const _0x372909=Object['keys'](_0x38d838)['length'];if(_0x372909===0x8f5*-0x2+0x1d5f+-0xb75){_0xeaadfb(new Error('No\x20nodes\x20f'+'ound'));return;}let _0xdc7351=0x29c*-0x7+-0x1082+0x22c6;const _0x1b694e={},_0x57635d={};for(const _0x395b8c of Object['keys'](_0x38d838)){const _0x931efa=_0x38d838[_0x395b8c],_0x1502ce={'node':{'ip':_0x931efa['ip'],'port':_0x931efa['port']},'service':_0x55cfbd['service'],'method':_0x55cfbd['method'],'gid':_0x55cfbd['gid']||'local'};global['distributi'+'on']['local']['comm']['send'](_0x2830e3,_0x1502ce,(_0x5e82ce,_0x24e7c4)=>{_0x5e82ce?_0x57635d[_0x395b8c]=_0x5e82ce:_0x1b694e[_0x395b8c]=_0x24e7c4,_0xdc7351+=0x1*-0xf63+0x61*-0x19+-0x43*-0x5f,_0xdc7351===_0x372909&&_0xeaadfb(_0x57635d,_0x1b694e);});}});}return{'send':_0x3a6af3};};module['exports']=comm;
9
+ function comm(_0x24ccfd){const _0x352aee={};_0x352aee['gid']=_0x24ccfd['gid']||'all';function _0x10652b(_0x2b9a36,_0x3501c2,_0xb35c4f){global['distributi'+'on']['local']['groups']['get'](_0x352aee['gid'],(_0x6f2180,_0x4fbe1f)=>{const _0x343aa5=Object['keys'](_0x4fbe1f)['length'];if(_0x343aa5===-0x2583+0x1*0x1f1f+0x664){_0xb35c4f(new Error('No\x20nodes\x20f'+'ound'));return;}let _0x1146be=0xac1*0x1+0x3*0xaf6+-0x2ba3;const _0x22d70b={},_0x4e1530={};for(const _0x38a727 of Object['keys'](_0x4fbe1f)){const _0x236a9e=_0x4fbe1f[_0x38a727],_0x154c3b={'node':{'ip':_0x236a9e['ip'],'port':_0x236a9e['port']},'service':_0x3501c2['service'],'method':_0x3501c2['method'],'gid':_0x3501c2['gid']||'local'};global['distributi'+'on']['local']['comm']['send'](_0x2b9a36,_0x154c3b,(_0x4f1b5b,_0x3ae06a)=>{_0x4f1b5b?_0x4e1530[_0x38a727]=_0x4f1b5b:_0x22d70b[_0x38a727]=_0x3ae06a,_0x1146be+=0x1be5+0xd*0x106+-0x2932,_0x1146be===_0x343aa5&&_0xb35c4f(_0x4e1530,_0x22d70b);});}});}return{'send':_0x10652b};};module['exports']=comm;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const id=require('../util/id'),gossip=function(_0x2b8b8c){const _0x475077={};return _0x475077['gid']=_0x2b8b8c['gid']||'global',_0x475077['subset']=_0x2b8b8c['subset']||function(_0x9ca960){return Math['ceil'](Math['log'](_0x9ca960['length']));},{'send':(_0x36ae05,_0x11cbb2,_0x881258)=>{global['distributi'+'on']['local']['groups']['get'](_0x475077['gid'],(_0x1002cc,_0x45cb3f)=>{const _0x3f1a4e=_0x475077['subset'](Object['keys'](_0x45cb3f)),_0x4a721a=function(_0x25671e){const _0x4baab8=new Set();while(_0x4baab8['size']<_0x3f1a4e){const _0x15b724=Math['floor'](Math['random']()*_0x25671e['length']);_0x4baab8['add'](_0x25671e[_0x15b724]);}return _0x4baab8;},_0x301671=_0x4a721a(Object['keys'](_0x45cb3f)),_0xffcb19={},_0x5d7f55={};let _0x139945=0x15*-0xb6+-0x9*0x258+0x2406;if(_0x36ae05['mid']&&_0x36ae05['gid']){}else _0x36ae05={'message':_0x36ae05,'remote':_0x11cbb2,'mid':id['getMID'](_0x36ae05),'gid':_0x475077['gid']};for(const _0x22723c of _0x301671){const _0x39d636=_0x45cb3f[_0x22723c],_0x6cf7e9={'node':{'ip':_0x39d636['ip'],'port':_0x39d636['port']},'service':'gossip','method':'recv'};global['distributi'+'on']['local']['comm']['send']([_0x36ae05],_0x6cf7e9,(_0x2916ad,_0x22f437)=>{_0x2916ad?_0x5d7f55[_0x22723c]=_0x2916ad:_0xffcb19[_0x22723c]=_0x22f437,_0x139945+=-0x60e+-0x5e7*-0x1+-0x1*-0x28,_0x139945===_0x3f1a4e&&(_0x881258&&_0x881258(_0x5d7f55,_0xffcb19));});}});},'at':(_0x5f1dcb,_0x2946f3,_0x19cee4)=>{const _0x3853f1=setInterval(_0x2946f3,_0x5f1dcb);_0x19cee4&&_0x19cee4(null,_0x3853f1);},'del':(_0x544c82,_0x68fcde)=>{clearInterval(_0x544c82),_0x68fcde&&_0x68fcde(null,_0x544c82);}};};module['exports']=gossip;
9
+ const id=require('../util/id'),gossip=function(_0x5881d0){const _0x14c554={};return _0x14c554['gid']=_0x5881d0['gid']||'all',_0x14c554['subset']=_0x5881d0['subset']||function(_0x45bde4){return Math['ceil'](Math['log'](_0x45bde4['length']));},{'send':(_0x4c0709,_0x297eae,_0x39f455)=>{global['distributi'+'on']['local']['groups']['get'](_0x14c554['gid'],(_0x1d8b46,_0x4af764)=>{const _0x56706a=_0x14c554['subset'](Object['keys'](_0x4af764)),_0x56993e=function(_0x51c801){const _0x31d3b4=new Set();while(_0x31d3b4['size']<_0x56706a){const _0x9f16cf=Math['floor'](Math['random']()*_0x51c801['length']);_0x31d3b4['add'](_0x51c801[_0x9f16cf]);}return _0x31d3b4;},_0x5f2612=_0x56993e(Object['keys'](_0x4af764)),_0xac0201={},_0x375c03={};let _0x41835c=0x218c+0x41*0x3b+0x3*-0x102d;if(_0x4c0709['mid']&&_0x4c0709['gid']){}else _0x4c0709={'message':_0x4c0709,'remote':_0x297eae,'mid':id['getMID'](_0x4c0709),'gid':_0x14c554['gid']};for(const _0x5cb364 of _0x5f2612){const _0x1bc24f=_0x4af764[_0x5cb364],_0xe1d943={'node':{'ip':_0x1bc24f['ip'],'port':_0x1bc24f['port']},'service':'gossip','method':'recv'};global['distributi'+'on']['local']['comm']['send']([_0x4c0709],_0xe1d943,(_0x29db60,_0x1baa3e)=>{_0x29db60?_0x375c03[_0x5cb364]=_0x29db60:_0xac0201[_0x5cb364]=_0x1baa3e,_0x41835c+=-0x15b+0x13*-0x16b+0x1c4d,_0x41835c===_0x56706a&&(_0x39f455&&_0x39f455(_0x375c03,_0xac0201));});}});},'at':(_0x2f1c5f,_0x2fc0a5,_0x15af38)=>{const _0x3cd429=setInterval(_0x2fc0a5,_0x2f1c5f);_0x15af38&&_0x15af38(null,_0x3cd429);},'del':(_0x4a563a,_0x1a607f)=>{clearInterval(_0x4a563a),_0x1a607f&&_0x1a607f(null,_0x4a563a);}};};module['exports']=gossip;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const groups=function(_0x27bdae){const _0x30ce69={};return _0x30ce69['gid']=_0x27bdae['gid']||'global',{'put':(_0x15e8b2,_0x343fca,_0x36a777)=>{global['distributi'+'on'][_0x30ce69['gid']]['comm']['send']([_0x15e8b2,_0x343fca],{'service':'groups','method':'put'},_0x36a777);},'del':(_0x302f70,_0x2e5da9)=>{global['distributi'+'on'][_0x30ce69['gid']]['comm']['send']([_0x302f70],{'service':'groups','method':'del'},_0x2e5da9);},'get':(_0x1b2b65,_0x7f4fa)=>{global['distributi'+'on'][_0x30ce69['gid']]['comm']['send']([_0x1b2b65],{'service':'groups','method':'get'},_0x7f4fa);},'add':(_0x406ecb,_0x4d7114,_0x41529c)=>{global['distributi'+'on'][_0x30ce69['gid']]['comm']['send']([_0x406ecb,_0x4d7114],{'service':'groups','method':'add'},_0x41529c);},'rem':(_0x417a3e,_0xb9879f,_0xa28bb0)=>{global['distributi'+'on'][_0x30ce69['gid']]['comm']['send']([_0x417a3e,_0xb9879f],{'service':'groups','method':'rem'},_0xa28bb0);}};};module['exports']=groups;
9
+ const groups=function(_0x261c11){const _0x949b56={};return _0x949b56['gid']=_0x261c11['gid']||'all',{'put':(_0x1ed41f,_0x4a2e32,_0x229550)=>{global['distributi'+'on'][_0x949b56['gid']]['comm']['send']([_0x1ed41f,_0x4a2e32],{'service':'groups','method':'put'},_0x229550);},'del':(_0x2acebb,_0x3d6319)=>{global['distributi'+'on'][_0x949b56['gid']]['comm']['send']([_0x2acebb],{'service':'groups','method':'del'},_0x3d6319);},'get':(_0x22fb11,_0x179b52)=>{global['distributi'+'on'][_0x949b56['gid']]['comm']['send']([_0x22fb11],{'service':'groups','method':'get'},_0x179b52);},'add':(_0x3852b4,_0x1326db,_0x2d20de)=>{global['distributi'+'on'][_0x949b56['gid']]['comm']['send']([_0x3852b4,_0x1326db],{'service':'groups','method':'add'},_0x2d20de);},'rem':(_0x2d03db,_0x474a81,_0x55326c)=>{global['distributi'+'on'][_0x949b56['gid']]['comm']['send']([_0x2d03db,_0x474a81],{'service':'groups','method':'rem'},_0x55326c);}};};module['exports']=groups;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const distribution=require('../../dist'+'ribution'),id=distribution['util']['id'];function mr(_0x25fd4b){const _0x2e9d09={'gid':_0x25fd4b['gid']||'global'};function _0x2b94c5(_0x41aa83,_0x5882c1){const _0x3d7958=id['getSID'](_0x41aa83),_0x2c98d8={'mapper':_0x41aa83['map'],'reducer':_0x41aa83['reduce'],'map':function(_0x13da64,_0x96326c,_0x52508f,_0x4c64e4){if(_0x13da64['length']==-0x1f2b*0x1+-0x17de+0x3709)_0x4c64e4(null,{});else{const _0xadd485=[];let _0x2de1e9=0x1063*0x1+-0xad1*-0x1+-0x1b34;_0x13da64['forEach'](_0x47427a=>{distribution[_0x96326c]['store']['get'](_0x47427a,(_0x1643c8,_0x179075)=>{_0x2de1e9++;const _0x746072=this['mapper'](_0x47427a,_0x179075);Array['isArray'](_0x746072)?_0xadd485['push'](..._0x746072):_0xadd485['push'](_0x746072),_0x2de1e9==_0x13da64['length']&&distribution['local']['store']['put'](_0xadd485,_0x52508f+'_map',(_0x505369,_0x427025)=>{_0x4c64e4(_0x505369,_0xadd485);});});});}},'shuffle':function(_0x485683,_0x52a07d,_0x18715d){distribution['local']['store']['get'](_0x52a07d+'_map',(_0x379ccc,_0x4e5c28)=>{if(!_0x379ccc){let _0x59dc81=-0x23a2+0x1309+0x1099;_0x4e5c28['forEach'](_0x7e8d6b=>{const [_0x9e7f61]=Object['keys'](_0x7e8d6b);distribution[_0x485683]['mem']['put'](_0x7e8d6b[_0x9e7f61],{'key':_0x9e7f61,'action':'append'},(_0xee1926,_0x1eb4ff)=>{_0x59dc81++,_0x59dc81==_0x4e5c28['length']&&_0x18715d(null,_0x4e5c28);});});}else _0x18715d(_0x379ccc,{});});},'reduce':function(_0x3d4f5e,_0xd8c090,_0x31e966){distribution['local']['mem']['get']({'key':null,'gid':_0x3d4f5e},(_0x1f9175,_0x27a433)=>{let _0x4c4c0d=[],_0x560707=0x16f1+0x2331+-0x3a22;_0x27a433['length']==0x5*0x48f+-0x25ca+0x1*0xeff&&_0x31e966(null,null),_0x27a433['forEach'](_0x5c8bf2=>distribution['local']['mem']['get']({'key':_0x5c8bf2,'gid':_0x3d4f5e},(_0x450cc5,_0x46b259)=>{const _0x56c1db=this['reducer'](_0x5c8bf2,_0x46b259);_0x4c4c0d=_0x4c4c0d['concat'](_0x56c1db),_0x560707++,_0x560707==_0x27a433['length']&&_0x31e966(null,_0x4c4c0d);}));});}},_0x474ad0=function(_0x437781,_0x3ee4c8){const _0x51ef25={};return Object['keys'](_0x3ee4c8)['forEach'](_0x30d20e=>{_0x51ef25[_0x30d20e]=[];}),_0x437781['forEach'](_0x110627=>{const _0x570353=id['getID'](_0x110627),_0x36c0ec=id['naiveHash'](_0x570353,Object['keys'](_0x3ee4c8));_0x51ef25[_0x36c0ec]['push'](_0x110627);}),_0x51ef25;};distribution[_0x2e9d09['gid']]['routes']['put'](_0x2c98d8,'mr-'+_0x3d7958,(_0x574c15,_0xd4f7c5)=>{distribution['local']['groups']['get'](_0x2e9d09['gid'],(_0x26ea36,_0x18dfa7)=>{const _0x299848=_0x474ad0(_0x41aa83['keys'],_0x18dfa7);let _0x1148e8=0xf81+-0x2*0x74b+-0xeb;const _0x5b36e9=Object['keys'](_0x18dfa7)['length'],_0x237707={'service':'mr-'+_0x3d7958,'method':'map'};for(const _0xf35548 in _0x18dfa7){_0x237707['node']=_0x18dfa7[_0xf35548];const _0x22d5bf=[_0x299848[_0xf35548],_0x2e9d09['gid'],_0x3d7958];distribution['local']['comm']['send'](_0x22d5bf,_0x237707,(_0xb90796,_0xad07e0)=>{++_0x1148e8;if(_0x1148e8==_0x5b36e9){const _0x385a0e={'service':'mr-'+_0x3d7958,'method':'shuffle'};distribution[_0x2e9d09['gid']]['comm']['send']([_0x2e9d09['gid'],_0x3d7958],_0x385a0e,(_0x30d7e9,_0x1e99fd)=>{const _0x2936fa={'service':'mr-'+_0x3d7958,'method':'reduce'};distribution[_0x2e9d09['gid']]['comm']['send']([_0x2e9d09['gid'],_0x3d7958],_0x2936fa,(_0x268e02,_0x183165)=>{let _0x219824=[];for(const _0x2fbb50 of Object['values'](_0x183165)){_0x2fbb50!==null&&(_0x219824=_0x219824['concat'](_0x2fbb50));}_0x5882c1(null,_0x219824);return;distribution[_0x2e9d09['gid']]['routes']['rem']('mr-'+_0x3d7958,(_0x32a27f,_0x35cda5)=>{});});});}});}});});}return{'exec':_0x2b94c5};};module['exports']=mr;
9
+ const distribution=require('../../dist'+'ribution'),id=distribution['util']['id'];function mr(_0x2a500f){const _0x2e7d58={'gid':_0x2a500f['gid']||'all'};function _0x13037d(_0x946ac,_0x4b7208){const _0x57cbe5=id['getSID'](_0x946ac),_0x2375b3={'mapper':_0x946ac['map'],'reducer':_0x946ac['reduce'],'map':function(_0x306fc9,_0x4db300,_0x58d274,_0x48922c){if(_0x306fc9['length']==0x2*0x3f8+-0x26ad+0x1*0x1ebd)_0x48922c(null,{});else{const _0x507762=[];let _0x20543a=0x1*0x6cb+0x236c+-0x2a37;_0x306fc9['forEach'](_0x5bad0f=>{distribution[_0x4db300]['store']['get'](_0x5bad0f,(_0x1bc3fa,_0x2aa78a)=>{_0x20543a++;const _0x169602=this['mapper'](_0x5bad0f,_0x2aa78a);Array['isArray'](_0x169602)?_0x507762['push'](..._0x169602):_0x507762['push'](_0x169602),_0x20543a==_0x306fc9['length']&&distribution['local']['store']['put'](_0x507762,_0x58d274+'_map',(_0x3e655c,_0x1c316f)=>{_0x48922c(_0x3e655c,_0x507762);});});});}},'shuffle':function(_0x2fa648,_0x4bbf20,_0x310f41){distribution['local']['store']['get'](_0x4bbf20+'_map',(_0x43b865,_0x55dbef)=>{if(!_0x43b865){let _0x4c2c48=-0x8d1+0x8a3+-0x17*-0x2;_0x55dbef['forEach'](_0x410bcd=>{const [_0x3b4c70]=Object['keys'](_0x410bcd);distribution[_0x2fa648]['mem']['put'](_0x410bcd[_0x3b4c70],{'key':_0x3b4c70,'action':'append'},(_0x15ac1b,_0x29fe9a)=>{_0x4c2c48++,_0x4c2c48==_0x55dbef['length']&&_0x310f41(null,_0x55dbef);});});}else _0x310f41(_0x43b865,{});});},'reduce':function(_0x5118b0,_0x2c1797,_0x43e2e6){distribution['local']['mem']['get']({'key':null,'gid':_0x5118b0},(_0x1959bf,_0x5672ab)=>{let _0x10b95d=[],_0x33d7e1=0x20da+0x20cd+-0x157*0x31;_0x5672ab['length']==-0x1*0xa2c+-0x1f8d+0x1*0x29b9&&_0x43e2e6(null,null),_0x5672ab['forEach'](_0xd63414=>distribution['local']['mem']['get']({'key':_0xd63414,'gid':_0x5118b0},(_0x45237b,_0x52e8a5)=>{const _0x57103a=this['reducer'](_0xd63414,_0x52e8a5);_0x10b95d=_0x10b95d['concat'](_0x57103a),_0x33d7e1++,_0x33d7e1==_0x5672ab['length']&&_0x43e2e6(null,_0x10b95d);}));});}},_0x3007f6=function(_0x58c29c,_0x1fecd6){const _0x44a4ca={};return Object['keys'](_0x1fecd6)['forEach'](_0x52832e=>{_0x44a4ca[_0x52832e]=[];}),_0x58c29c['forEach'](_0x1f6de0=>{const _0x15ec0f=id['getID'](_0x1f6de0),_0x5d6561=id['naiveHash'](_0x15ec0f,Object['keys'](_0x1fecd6));_0x44a4ca[_0x5d6561]['push'](_0x1f6de0);}),_0x44a4ca;};distribution[_0x2e7d58['gid']]['routes']['put'](_0x2375b3,'mr-'+_0x57cbe5,(_0xab799b,_0x389290)=>{distribution['local']['groups']['get'](_0x2e7d58['gid'],(_0x208fce,_0x47a2a8)=>{const _0x5edfc0=_0x3007f6(_0x946ac['keys'],_0x47a2a8);let _0x52a088=-0xd7*-0x7+-0xa23+0x221*0x2;const _0x1d8bce=Object['keys'](_0x47a2a8)['length'],_0x463428={'service':'mr-'+_0x57cbe5,'method':'map'};for(const _0x589447 in _0x47a2a8){_0x463428['node']=_0x47a2a8[_0x589447];const _0x70fa4b=[_0x5edfc0[_0x589447],_0x2e7d58['gid'],_0x57cbe5];distribution['local']['comm']['send'](_0x70fa4b,_0x463428,(_0x51194d,_0x14314b)=>{++_0x52a088;if(_0x52a088==_0x1d8bce){const _0x277d74={'service':'mr-'+_0x57cbe5,'method':'shuffle'};distribution[_0x2e7d58['gid']]['comm']['send']([_0x2e7d58['gid'],_0x57cbe5],_0x277d74,(_0x391d2b,_0x18fd20)=>{const _0x33515f={'service':'mr-'+_0x57cbe5,'method':'reduce'};distribution[_0x2e7d58['gid']]['comm']['send']([_0x2e7d58['gid'],_0x57cbe5],_0x33515f,(_0x9782f2,_0x43583e)=>{let _0x39ff20=[];for(const _0x6308a1 of Object['values'](_0x43583e)){_0x6308a1!==null&&(_0x39ff20=_0x39ff20['concat'](_0x6308a1));}_0x4b7208(null,_0x39ff20);return;distribution[_0x2e7d58['gid']]['routes']['rem']('mr-'+_0x57cbe5,(_0x20e508,_0x197f38)=>{});});});}});}});});}return{'exec':_0x13037d};};module['exports']=mr;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- function routes(_0x31dc7b){const _0x2cf96f={};_0x2cf96f['gid']=_0x31dc7b['gid']||'global';function _0x19bf63(_0x4531dd,_0x25452c,_0x350fc7=()=>{}){global['distributi'+'on'][_0x2cf96f['gid']]['comm']['send']([_0x4531dd,_0x25452c],{'service':'routes','method':'put'},_0x350fc7);}function _0x5185d1(_0x475546,_0x2cc92a,_0x42a3a6=()=>{}){global['distributi'+'on'][_0x2cf96f['gid']]['comm']['send']([_0x2cc92a],{'service':'routes','method':'rem'},_0x42a3a6);}return{'put':_0x19bf63,'rem':_0x5185d1};}module['exports']=routes;
9
+ function routes(_0x46acf0){const _0x46b597={};_0x46b597['gid']=_0x46acf0['gid']||'all';function _0x3b2713(_0x4c6473,_0x5a853b,_0xe15cfe=()=>{}){global['distributi'+'on'][_0x46b597['gid']]['comm']['send']([_0x4c6473,_0x5a853b],{'service':'routes','method':'put'},_0xe15cfe);}function _0x3af36c(_0x20a579,_0x8817f7,_0x1859ac=()=>{}){global['distributi'+'on'][_0x46b597['gid']]['comm']['send']([_0x8817f7],{'service':'routes','method':'rem'},_0x1859ac);}return{'put':_0x3b2713,'rem':_0x3af36c};}module['exports']=routes;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const status=function(_0x2f9f6d){const _0x595f09={};return _0x595f09['gid']=_0x2f9f6d['gid']||'global',{'get':(_0x4db342,_0x50138c)=>{const _0x30e3b8=[_0x4db342],_0x417d50={'service':'status','method':'get'};global['distributi'+'on'][_0x595f09['gid']]['comm']['send'](_0x30e3b8,_0x417d50,(_0x3022e2,_0x1e2350)=>{switch(_0x4db342){case'heapTotal':const _0x5897f9=Object['values'](_0x1e2350)['reduce']((_0x29a1fd,_0x3f5cbb)=>{return _0x29a1fd+_0x3f5cbb;},-0xb0*-0x30+0x14d2+-0x35d2);_0x50138c(_0x3022e2,_0x5897f9);break;case'nid':const _0x319283=Object['values'](_0x1e2350)['reduce']((_0x2e3ed9,_0x337889)=>{return _0x2e3ed9['concat'](_0x337889);},[]);_0x50138c(_0x3022e2,_0x319283);break;default:_0x50138c(_0x3022e2,_0x1e2350);break;}});},'spawn':(_0x59acb8,_0x4e1380)=>{_0x4e1380=_0x4e1380||function(){},global['distributi'+'on']['local']['status']['spawn'](_0x59acb8,(_0x346449,_0x2ea56c)=>{_0x346449?_0x4e1380(_0x346449):global['distributi'+'on']['local']['groups']['add'](_0x595f09['gid'],_0x59acb8,()=>{_0x4e1380(null,_0x2ea56c);}),global['distributi'+'on'][_0x595f09['gid']]['comm']['send']([_0x595f09['gid'],_0x59acb8],{'service':'groups','method':'add'},()=>{});});},'stop':_0x2f11b1=>{global['distributi'+'on'][_0x595f09['gid']]['comm']['send']([],{'service':'status','method':'stop'},_0x2f11b1);}};};module['exports']=status;
9
+ const status=function(_0x361efc){const _0x53485f={};return _0x53485f['gid']=_0x361efc['gid']||'all',{'get':(_0x486e4d,_0x166577)=>{const _0x2202e4=[_0x486e4d],_0x2031b2={'service':'status','method':'get'};global['distributi'+'on'][_0x53485f['gid']]['comm']['send'](_0x2202e4,_0x2031b2,(_0x4bd946,_0x5c9923)=>{switch(_0x486e4d){case'heapTotal':const _0x32b8e5=Object['values'](_0x5c9923)['reduce']((_0x88d14a,_0x19f390)=>{return _0x88d14a+_0x19f390;},-0x1561+0x420+0x1141);_0x166577(_0x4bd946,_0x32b8e5);break;case'nid':const _0x17b9ad=Object['values'](_0x5c9923)['reduce']((_0x4aa102,_0x30d543)=>{return _0x4aa102['concat'](_0x30d543);},[]);_0x166577(_0x4bd946,_0x17b9ad);break;default:_0x166577(_0x4bd946,_0x5c9923);break;}});},'spawn':(_0x1a4792,_0x1807e0)=>{_0x1807e0=_0x1807e0||function(){},global['distributi'+'on']['local']['status']['spawn'](_0x1a4792,(_0x1b39e2,_0x5e57a4)=>{_0x1b39e2?_0x1807e0(_0x1b39e2):global['distributi'+'on']['local']['groups']['add'](_0x53485f['gid'],_0x1a4792,()=>{_0x1807e0(null,_0x5e57a4);}),global['distributi'+'on'][_0x53485f['gid']]['comm']['send']([_0x53485f['gid'],_0x1a4792],{'service':'groups','method':'add'},()=>{});});},'stop':_0x532f5e=>{global['distributi'+'on'][_0x53485f['gid']]['comm']['send']([],{'service':'status','method':'stop'},_0x532f5e);}};};module['exports']=status;
10
10
  /* eslint-enable */
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@brown-ds/distribution",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "A library for building distributed systems.",
5
5
  "main": "distribution.js",
6
- "useLibrary": true,
6
+ "useLibrary": false,
7
7
  "directories": {
8
8
  "test": "test"
9
9
  },