senecajs / seneca-balance-client

seneca-balance-client
MIT License
18 stars 14 forks source link

parameterise the load-balancing algorithm #3

Closed rjrodger closed 8 years ago

rjrodger commented 8 years ago

allow user to pass in a function as an option to control how this is done:

seneca().use('balance-client', { strategy: function( ... ) { ... } } )

At the moment, simplistic round-robin is hard-coded in: https://github.com/rjrodger/seneca-balance-client/blob/master/balance-client.js#L156

cjihrig commented 8 years ago

Closing based on https://github.com/rjrodger/seneca-balance-client/issues/5#issuecomment-164571784