mirror of
https://github.com/DullJZ/s3-balance.git
synced 2026-09-06 16:27:38 +08:00
Remove consistent hash
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user