metroplex icon indicating copy to clipboard operation
metroplex copied to clipboard

Add ability to retrieve the sparks of a given server

Open lpinca opened this issue 9 years ago • 0 comments

This patch merges metroplex.spark and metroplex.sparks into metroplex.servers. This method now accepts an additional argument which can be a single spark id or an array of spark ids. If this argument is provided the method returns only the servers for the given spark id(s), otherwise it follows the old behavior. This is the new signature:

metroplex.servers(self, sparks, fn)

The old metroplex.sparks now returns the spark ids for the given server. It's new signature is the following:

metroplex.sparks(address, fn);

See discussion in #6.

P.S. The self argument was not documented and not so useful IMHO. I would like to remove it if the are no objections.

lpinca avatar Jul 09 '15 13:07 lpinca