Rate Policy

This commit is contained in:
2026-07-13 17:15:00 +03:00
parent 31bda58460
commit 4f6d2d0801
46 changed files with 3142 additions and 468 deletions
@@ -0,0 +1,23 @@
using Esiur.Resource;
using System.Threading;
namespace Esiur.Tests.Unit.Integration;
[Resource]
public partial class RateLimitedResource
{
int _callCount;
int _value;
[Export]
[RateControl("standard-call")]
public int Call() => Interlocked.Increment(ref _callCount);
[Export]
[RateControl("standard-set")]
public int Value
{
get => _value;
set => _value = value;
}
}