InboundTriggerRateLimiter
AgentPrism.Core.dllApplies a fixed-window rate limit per inbound trigger.
public sealed class InboundTriggerRateLimiterInheritance
Section titled “Inheritance”object ← InboundTriggerRateLimiter
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The limit lives in process memory: AgentPrism does not ship a
distributed rate limiter. In a multi-instance deployment the limit applies
PER INSTANCE, not per trigger across the whole deployment — the same
documented scope as AgentPrismRateLimitOptions.
Hand-written rather than built on System.Threading.RateLimiting
(the type AgentPrismRateLimitFilter uses): that namespace ships in
the ASP.NET Core shared framework’s reference pack, which
AgentPrism.Core — a plain class library with no dependency on
ASP.NET Core — cannot see. A dispatcher that validates a signature and
queues a job has no reason to depend on a web framework.
Constructors
Section titled “Constructors”InboundTriggerRateLimiter(IOptionsMonitor<AgentPrismInboundTriggerOptions>, TimeProvider?)
Section titled “ InboundTriggerRateLimiter(IOptionsMonitor<AgentPrismInboundTriggerOptions>, TimeProvider?)”Creates a new trigger rate limiter.
public InboundTriggerRateLimiter(IOptionsMonitor<AgentPrismInboundTriggerOptions> optionsMonitor, TimeProvider? timeProvider = null)Parameters
Section titled “Parameters”optionsMonitor IOptionsMonitor<AgentPrismInboundTriggerOptions>
The inbound trigger settings.
timeProvider TimeProvider?
The clock. Defaults to TimeProvider.System.
Exceptions
Section titled “Exceptions”optionsMonitor is null.
Methods
Section titled “Methods”TryAcquire(Guid)
Section titled “ TryAcquire(Guid)”Tries to acquire one permit for the given trigger.
public bool TryAcquire(Guid triggerId)Parameters
Section titled “Parameters”triggerId Guid
The trigger identifier.
Returns
Section titled “Returns”true if the request is within the trigger’s per-minute limit.