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