func getAlgorithmParams(config *pb.Algorithm) (leaseLength, refreshInterval time.Duration) { return time.Duration(config.GetLeaseLength()) * time.Second, time.Duration(config.GetRefreshInterval()) * time.Second }
func GetAlgorithm(config *pb.Algorithm) Algorithm { return algorithms[config.GetKind()](config) }