mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-30 15:19:01 +08:00
Create balancer.go
This commit is contained in:
parent
39941edc0b
commit
0a851ec00b
20
weed/mq/balancer/balancer.go
Normal file
20
weed/mq/balancer/balancer.go
Normal file
@ -0,0 +1,20 @@
|
||||
package balancer
|
||||
|
||||
import cmap "github.com/orcaman/concurrent-map"
|
||||
|
||||
type Balancer struct {
|
||||
brokers cmap.ConcurrentMap[string, *BrokerStats]
|
||||
}
|
||||
type BrokerStats struct {
|
||||
stats map[TopicPartition]*TopicPartitionStats
|
||||
}
|
||||
|
||||
type TopicPartition struct {
|
||||
Topic string
|
||||
RangeStart int32
|
||||
RangeStop int32
|
||||
}
|
||||
|
||||
type TopicPartitionStats struct {
|
||||
Throughput int64
|
||||
}
|
Loading…
Reference in New Issue
Block a user