metafora icon indicating copy to clipboard operation
metafora copied to clipboard

Simplify the balancer interface, so it only deals with claiming tasks.

Open epsniff opened this issue 10 years ago • 0 comments

We are considering simplifying the Balancer interface to be just a Claimer function. And the balancer code will be its own function, since in practice we only have one implementation of balancer but many types of claimers.

A possible interface could be: type Claimer func(ctx BalancerContext, task string) bool This could also make the decorator pattern even easier to use with Claiming tasks.

epsniff avatar Dec 23 '14 00:12 epsniff