pub struct AdmissionConfig {
pub max_per_subject: Option<usize>,
pub max_per_group: Option<usize>,
pub queue_capacity: usize,
pub queue_timeout_secs: u64,
pub cpu_millis_total: Option<u64>,
pub memory_bytes_total: Option<u64>,
pub gpu_total: usize,
}Expand description
Per-Subject / per-group admission quotas + wait-queue bounds + declared local schedulable capacity (#525 P2).
๐ See the module-level โNEEDS REVIEWER SIGN-OFFโ doc for the judgment calls baked into this shape.
All limits default to unconstrained so that a PoolConfig with no
explicit admission section behaves exactly as before this change (no
regression for the existing solo/no-quota case): only an operator who
opts in by lowering these gets admission-control behavior beyond the
pre-existing max_sandboxes capacity check.
Fieldsยง
ยงmax_per_subject: Option<usize>Maximum concurrently-active sandboxes for a single Subject.
None (default) = unconstrained.
Serialized as absent when unlimited (rather than a sentinel like
usize::MAX, which is not representable as a TOML i64 and would break
Config::save()).
max_per_group: Option<usize>Maximum concurrently-active sandboxes for a single group (see
[derive_group_selector]). None (default) = unconstrained.
This counter is node-local capacity partitioning โ a fairness / organization mechanism, not a trust or billing boundary. The authoritative quota is the ledger/capability path (#922/#925: verify presented grant โ debit cell ledger โ emit receipt), which this module deliberately does not implement. See module docs, point 2.
Serialized as absent when unlimited (see Self::max_per_subject).
queue_capacity: usizeBound on the number of callers allowed to wait in the admission queue
at once. A request that would exceed this is rejected immediately
(QueueFull) rather than queued.
queue_timeout_secs: u64How long a queued request waits for capacity before giving up
(QueueTimeout).
cpu_millis_total: Option<u64>Total schedulable CPU (millicores) for this nodeโs local capacity
overlay. None (default) = the CPU dimension is not enforced.
memory_bytes_total: Option<u64>Total schedulable memory (bytes) for this nodeโs local capacity
overlay. None (default) = the memory dimension is not enforced.
gpu_total: usizeTotal GPU count available for scheduling. Default 0: a request that
asks for a GPU (Demand::gpu > 0) is fail-closed rejected unless an
operator explicitly declares GPU capacity here. Requests that donโt
ask for a GPU (Demand::gpu == 0, the default) are never affected by
this value.
Trait Implementationsยง
Sourceยงimpl Clone for AdmissionConfig
impl Clone for AdmissionConfig
Sourceยงfn clone(&self) -> AdmissionConfig
fn clone(&self) -> AdmissionConfig
1.0.0 (const: unstable) ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSourceยงimpl Debug for AdmissionConfig
impl Debug for AdmissionConfig
Sourceยงimpl Default for AdmissionConfig
impl Default for AdmissionConfig
Sourceยงimpl<'de> Deserialize<'de> for AdmissionConfigwhere
AdmissionConfig: Default,
impl<'de> Deserialize<'de> for AdmissionConfigwhere
AdmissionConfig: Default,
Sourceยงfn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementationsยง
impl Freeze for AdmissionConfig
impl RefUnwindSafe for AdmissionConfig
impl Send for AdmissionConfig
impl Sync for AdmissionConfig
impl Unpin for AdmissionConfig
impl UnsafeUnpin for AdmissionConfig
impl UnwindSafe for AdmissionConfig
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
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
ยงimpl<T> Instrument for T
impl<T> Instrument for T
ยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
ยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more