Adding RateLimit Feature ...

This commit is contained in:
2026-11-09 15:40:10 +03:30
parent 0a8f9692dd
commit cba7637255
17 changed files with 787 additions and 10 deletions
+21
View File
@@ -0,0 +1,21 @@
using xCommons.Models;
using xCommons.Configurations;
namespace xCommons.Interfaces
{
public interface IXRateLimitProvider
{
bool IsEnabled { get; }
XRateLimitResult TryConsume(
string key,
int limit,
int periodSeconds
);
XRateLimitResult TryConsume(
string key,
XRateLimitRule rule
);
}
}