This commit is contained in:
chrislu
2023-12-22 11:33:50 -08:00
parent ee1c9bc314
commit e0727071c8
7 changed files with 49 additions and 48 deletions

View File

@@ -32,9 +32,10 @@ type Balancer struct {
// Collected from all brokers when they connect to the broker leader
TopicToBrokers cmap.ConcurrentMap[string, *PartitionSlotToBrokerList] // key: topic name
}
func NewBalancer() *Balancer {
return &Balancer{
Brokers: cmap.New[*BrokerStats](),
Brokers: cmap.New[*BrokerStats](),
TopicToBrokers: cmap.New[*PartitionSlotToBrokerList](),
}
}