Skip to main content

AdmissionConfig

Struct AdmissionConfig 

Source
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: usize

Bound 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: u64

How 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: usize

Total 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

Sourceยง

fn clone(&self) -> AdmissionConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) ยท Sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Sourceยง

impl Debug for AdmissionConfig

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Sourceยง

impl Default for AdmissionConfig

Sourceยง

fn default() -> Self

Returns the โ€œdefault valueโ€ for a type. Read more
Sourceยง

impl<'de> Deserialize<'de> for AdmissionConfig

Sourceยง

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Sourceยง

impl Serialize for AdmissionConfig

Sourceยง

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementationsยง

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> CloneToUninit for T
where T: Clone,

Sourceยง

unsafe fn clone_to_uninit(&self, dest: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

ยง

impl<T> Instrument for T

ยง

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
ยง

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T> IntoEither for T

Sourceยง

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
ยง

impl<T> NoneValue for T
where T: Default,

ยง

type NoneType = T

ยง

fn null_value() -> T

The none-equivalent value.
ยง

impl<T> NoneValue for T
where T: Default,

ยง

type NoneType = T

ยง

fn null_value() -> T

The none-equivalent value.
ยง

impl<T> Pointable for T

ยง

const ALIGN: usize

The alignment of pointer.
ยง

type Init = T

The type for initializers.
ยง

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
ยง

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
ยง

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
ยง

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
ยง

impl<T> PolicyExt for T
where T: ?Sized,

ยง

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
ยง

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Sourceยง

impl<T> Same for T

Sourceยง

type Output = T

Should always be Self
Sourceยง

impl<T> Serialize for T
where T: Serialize + ?Sized,

Sourceยง

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>

ยง

impl<T> ServiceExt for T

ยง

fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
where Self: Sized,

Apply a transformation to the response body. Read more
ยง

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using HTTP status codes. Read more
ยง

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using gRPC headers. Read more
ยง

fn follow_redirects(self) -> FollowRedirect<Self>
where Self: Sized,

Follow redirect resposes using the Standard policy. Read more
Sourceยง

impl<T> ToOwned for T
where T: Clone,

Sourceยง

type Owned = T

The resulting type after obtaining ownership.
Sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
ยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

ยง

fn vzip(self) -> V

ยง

impl<T> WithSubscriber for T

ยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
ยง

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Sourceยง

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

ยง

impl<T> ErasedDestructor for T
where T: 'static,

ยง

impl<T> MaybeSend for T
where T: Send,

ยง

impl<T> MaybeSend for T
where T: Send,

ยง

impl<T> MaybeSync for T
where T: Sync,

ยง

impl<T> MaybeSync for T
where T: Sync,

ยง

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,

Sourceยง

impl<T> TerminalState for T
where T: Clone + Send + Sync,