pub struct TenantActionRate {
pub max_actions: u64,
pub window_ms: i64,
}Expand description
业务作用:单租户变更类管理动作的固定窗口速率上限。
窗口边界由数据库时钟对齐,多副本 Orchestrator 共享同一套窗口;预算只按首次 提交的新 operation 计,完全相同的已提交 operation 重放不重复计数,失败回滚不消耗。
Fields§
§max_actions: u64单窗口允许提交的动作数;0 表示完全封禁。
window_ms: i64窗口长度(毫秒),必须为正;非法值在动作路径上报配置错误而不是稳定拒绝。
Trait Implementations§
Source§impl Clone for TenantActionRate
impl Clone for TenantActionRate
impl Copy for TenantActionRate
Source§impl Debug for TenantActionRate
impl Debug for TenantActionRate
impl Eq for TenantActionRate
Source§impl PartialEq for TenantActionRate
impl PartialEq for TenantActionRate
impl StructuralPartialEq for TenantActionRate
Auto Trait Implementations§
impl Forget for TenantActionRate
impl Freeze for TenantActionRate
impl Move for TenantActionRate
impl RefUnwindSafe for TenantActionRate
impl Send for TenantActionRate
impl Sync for TenantActionRate
impl Unpin for TenantActionRate
impl UnsafeUnpin for TenantActionRate
impl UnwindSafe for TenantActionRate
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