Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

Create balancer.go

chrislu0a851ec00b45
diff --git a/weed/mq/balancer/balancer.go b/weed/mq/balancer/balancer.go
new file mode 100644
index 0000000000..4d9005e823
--- /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
+}