feat: 初始化 Gateway 仓库

This commit is contained in:
root
2026-01-29 05:25:02 +00:00
commit 2b6402058d
10 changed files with 437 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
namespace TakeoutSaaS.ApiGateway.Configuration;
/// <summary>
/// 网关限流参数配置。
/// </summary>
public class GatewayRateLimitOptions
{
/// <summary>
/// 是否开启固定窗口限流。
/// </summary>
public bool Enabled { get; set; } = true;
/// <summary>
/// 固定窗口内允许的最大请求数。
/// </summary>
public int PermitLimit { get; set; } = 300;
/// <summary>
/// 固定窗口长度(秒)。
/// </summary>
public int WindowSeconds { get; set; } = 60;
/// <summary>
/// 排队等待的最大请求数。
/// </summary>
public int QueueLimit { get; set; } = 100;
}