refactor: remove dynamic speed limit logic and keep static limiter behavior#14
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
AddDynamicSpeedLimit、UpdateDynamicSpeedLimit、UserLimitInfo.DynamicSpeedLimit、UserLimitInfo.ExpireTime、节点侧SpeedChecker与dynamicSpeedLimitPeriodic等动态限速分支和文件(删除limiter/dynamic.go,移除相关分支)。SpeedLimit、用户级SpeedLimit、DeviceLimit判定、以及SpeedLimiterbucket 缓存与失效(UpdateUser中速度变更时删除旧 bucket 的逻辑)。determineSpeedLimit保留并从limiter/dynamic.go迁移到limiter/speed.go,以便继续用于普通限速计算。LimitConfig中的EnableDynamicSpeedLimit与DynamicSpeedLimitConfig定义,相关节点任务中对traffic的维护与清理也随之移除。Testing
gofmt -w(受影响文件已格式化)。go build ./...成功(构建通过)。go test ./...在该环境超时退出(环境内go test超时退出码为 124),输出提示根包无测试文件 (? github.com/InazumaV/V2bX [no test files])。Codex Task