pub struct QuotaState {
pub over_quota: AtomicBool,
pub reset_epoch: AtomicI64,
}Expand description
Shared, hot-reload-surviving quota verdict the proxy enforces. The quota_loop writes it from
the control plane’s verdict; the proxy reads it per request. It lives in AppState (not the
hot-swappable Runtime) so a policy reload never resets the enforcement state.
Fields§
§over_quota: AtomicBooltrue while the edge is over its quota — the proxy returns 429.
reset_epoch: AtomicI64Unix second the quota resets (period rollover); 0 = unknown. The Retry-After hint.
Implementations§
Source§impl QuotaState
impl QuotaState
Trait Implementations§
Source§impl Debug for QuotaState
impl Debug for QuotaState
Source§impl Default for QuotaState
impl Default for QuotaState
Source§fn default() -> QuotaState
fn default() -> QuotaState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for QuotaState
impl RefUnwindSafe for QuotaState
impl Send for QuotaState
impl Sync for QuotaState
impl Unpin for QuotaState
impl UnsafeUnpin for QuotaState
impl UnwindSafe for QuotaState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more