Remove consistent hash

This commit is contained in:
DullJZ
2025-10-01 20:47:50 +08:00
parent 48bc2d9b11
commit c2de062070
5 changed files with 2 additions and 119 deletions
-4
View File
@@ -30,8 +30,6 @@ func NewBalancer(manager *bucket.Manager, cfg *config.BalancerConfig) (*Balancer
strategy = NewLeastSpaceStrategy()
case "weighted":
strategy = NewWeightedStrategy()
case "consistent-hash":
strategy = NewConsistentHashStrategy()
default:
return nil, fmt.Errorf("unknown balancer strategy: %s", cfg.Strategy)
}
@@ -124,8 +122,6 @@ func (b *Balancer) SetStrategy(strategyName string) error {
strategy = NewLeastSpaceStrategy()
case "weighted":
strategy = NewWeightedStrategy()
case "consistent-hash":
strategy = NewConsistentHashStrategy()
default:
return fmt.Errorf("unknown balancer strategy: %s", strategyName)
}