metafora
metafora copied to clipboard
Simplify the balancer interface, so it only deals with claiming tasks.
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.