pub struct SchedulerConfig {
pub shards: usize,
pub max_global: usize,
pub max_per_tenant: usize,
pub quantum: u64,
pub quantum_by_tenant: HashMap<TenantKey, u64>,
pub quantum_provider: Option<Arc<dyn Fn(TenantKey) -> u64 + Send + Sync>>,
pub backpressure: BackpressurePolicy,
pub backpressure_by_tenant: HashMap<TenantKey, BackpressurePolicy>,
pub top_tenants_capacity: usize,
}Expand description
Scheduler runtime configuration.
Fields§
§shards: usizeNumber of shards used to partition tenant state.
max_global: usizeGlobal queue capacity across all tenants.
max_per_tenant: usizeMaximum pending live tasks per tenant.
Cancelled/expired entries are compacted lazily and are not intended to consume this limit once reclaimed.
quantum: u64Base DRR quantum for tenants without overrides.
quantum_by_tenant: HashMap<TenantKey, u64>Static per-tenant DRR quantum overrides.
quantum_provider: Option<Arc<dyn Fn(TenantKey) -> u64 + Send + Sync>>Dynamic per-tenant DRR quantum provider.
backpressure: BackpressurePolicyDefault backpressure policy.
backpressure_by_tenant: HashMap<TenantKey, BackpressurePolicy>Per-tenant backpressure policy overrides.
top_tenants_capacity: usizeMaximum number of tenants tracked in top-talker metrics.
Trait Implementations§
Source§impl Clone for SchedulerConfig
impl Clone for SchedulerConfig
Source§fn clone(&self) -> SchedulerConfig
fn clone(&self) -> SchedulerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SchedulerConfig
impl Debug for SchedulerConfig
Auto Trait Implementations§
impl Freeze for SchedulerConfig
impl !RefUnwindSafe for SchedulerConfig
impl Send for SchedulerConfig
impl Sync for SchedulerConfig
impl Unpin for SchedulerConfig
impl !UnwindSafe for SchedulerConfig
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