lib: refactored cluster schedule_handlers
Scheduler handler for cluster were implemented in function prototype
form, which can be converted to newer syntax of classes. Also seperated
concern for attaching listener to one of the internal methods of class
in round_robin_handle. Used Map
instead of Array
when there are
cases for continous finding element. Also prefered destructuring over
sending large number of parameters because one of the parameters
addressType
can only be used in shared_handle implementation and not
round_robin.
Fixes: https://github.com/nodejs/node/issues/32480
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines