Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / windowRefund

Function: windowRefund() ​

ts
function windowRefund(state, amount): SlidingWindowState;

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

Refunds into the head slot; never below zero across the ring.

Parameters ​

ParameterType
stateSlidingWindowState
amountnumber

Returns ​

SlidingWindowState