diff options
| author | chrislu <chris.lu@gmail.com> | 2023-09-10 22:01:25 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2023-09-10 22:01:25 -0700 |
| commit | 0a851ec00b455c72b405503f6f1f41728b15962e (patch) | |
| tree | 9d65dd97cedf4b07dff81e3503042ba8d6523b34 | |
| parent | 39941edc0bae3b9a4a2c3344caf494f7ab80a82a (diff) | |
| download | seaweedfs-0a851ec00b455c72b405503f6f1f41728b15962e.tar.xz seaweedfs-0a851ec00b455c72b405503f6f1f41728b15962e.zip | |
Create balancer.go
| -rw-r--r-- | weed/mq/balancer/balancer.go | 20 |
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 +} |
