aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--weed/mq/balancer/balancer.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/weed/mq/balancer/balancer.go b/weed/mq/balancer/balancer.go
new file mode 100644
index 000000000..4d9005e82
--- /dev/null
+++ b/weed/mq/balancer/balancer.go
@@ -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
+}