-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 增加限流功能#1539 * feat: 添加执行机器判断#1539 * feat: 代码调整#1539 * feat: 代码调整#1539 * feat: 针对带宽限流调整#1539 * feat: 只针对上传流量进行判断#1539 * feat: 添加测试代码#1539 * feat: 添加限流相关测试用例#1539 * feat: 测试代码调整#1539 * feat: 代码调整#1539 * feat: 上传限流调整#1539 * feat: 上传下载限流异常捕获#1539 * feat: 测试代码调整#1539 * feat: 测试代码调整#1539 * feat: 配置参数调整#1539 * feat: 由于redis expire只支持秒为单位,所以周期最小单位为秒#1539 * feat: contentLengthLong为-1的情况特殊处理#1539 * feat: 去掉多余引用#1539 * feat: 测试用例调整#1539 * feat: 时间参数从redisserver读取#1539 * feat: embeddedredis版本调整#1539 * feat: 测试用例调整#1539 * feat: 支持对url进行仓库维度限频#1539 * feat: 代码调整#1539 * feat: 后台增加限流配置页面 #2655 * feat: 后台增加限流配置页面 #2655 * feat: 后台增加限流配置页面 #2655 * feat: 后台增加限流配置页面 #2655 * feat: 后台增加限流配置页面 #2655 * feat: 代码回滚,因redis版本问题,获取统一时间逻辑调整#1539 * feat: 代码调整#1539 * feat: 后台增加限流配置页面 #2655 * feat: 异常显示调整#1539 * feat: 后台增加限流配置页面 #2655 * feat: 正则匹配规则修改#1539 * feat: 正则匹配规则修改#1539 * feat: 下载容量限制添加#1539 * feat: 后台增加限流配置页面 #2655 * feat: 后台增加限流配置页面 #2655 * feat: 代码调整#1539 * feat: 滑动窗口脚本调整#1539 * feat: 后台增加限流配置页面 #2655 * feat: targets过滤调整#1539 * feat: 代码调整#1539 * feat: 后台增加限流配置页面 #2655 * feat: 读取项目仓库信息增加异常捕获#1539 * feat: 读取项目仓库信息增加异常捕获#1539 * feat: 使用globalexceptionhandler处理#1539 * feat: targets校验调整#1539 * feat: 测试代码调整#1539 * feat: 后台增加限流配置页面 #2655 * feat: 代码调整#1539 * feat: 代码调整#1539 * feat: 代码调整#1539 --------- Co-authored-by: lannoy0523 <[email protected]> Co-authored-by: lannoy0523 <[email protected]>
- Loading branch information
1 parent
a96e0fe
commit 4401758
Showing
139 changed files
with
14,911 additions
and
61 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
...n/common-api/src/main/kotlin/com/tencent/bkrepo/common/api/exception/OverloadException.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. | ||
* | ||
* Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. | ||
* | ||
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. | ||
* | ||
* A copy of the MIT License is included in this file. | ||
* | ||
* | ||
* Terms of the MIT License: | ||
* --------------------------------------------------- | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | ||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of | ||
* the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT | ||
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN | ||
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
|
||
package com.tencent.bkrepo.common.api.exception | ||
|
||
import com.tencent.bkrepo.common.api.constant.HttpStatus | ||
import com.tencent.bkrepo.common.api.message.CommonMessageCode | ||
|
||
/** | ||
* 超过限流配置异常 | ||
*/ | ||
class OverloadException( | ||
val resource: String | ||
) : ErrorCodeException(CommonMessageCode.RATE_LIMITER_OVERLOAD, resource, status = HttpStatus.TOO_MANY_REQUESTS) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.