Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / windowAdmits

Function: windowAdmits()

ts
function windowAdmits(
   state, 
   cap, 
   amount): boolean;

Defined in: packages/core/src/admission/algorithms.ts:116

Admits when the trailing sum stays under cap. This bounds the fixed epoch double burst to one sub-window's allowance, a documented burst, not a silent fix of the pinned RV708 semantics.

Parameters

ParameterType
stateSlidingWindowState
capnumber
amountnumber

Returns

boolean