pub struct Admission {
pub target: RunningTarget,
pub lease: AdmissionLease,
}Expand description
A granted admission: where to send the request, and the lease that keeps the model loaded while it is in flight.
The two are returned together rather than the lease being attached to
RunningTarget because the target must stay Clone — the startup guard
broadcasts one target to every caller waiting on the same launch — and a
clonable lease would release once per clone.
Fields§
§target: RunningTargetWhere to route the request.
lease: AdmissionLeaseHeld for the life of the request. See AdmissionLease.
Implementations§
Source§impl Admission
impl Admission
Sourcepub const fn detached(target: RunningTarget) -> Self
pub const fn detached(target: RunningTarget) -> Self
An admission with no slot accounting, for runtimes that do not have any.
Sourcepub fn into_target(self) -> RunningTarget
pub fn into_target(self) -> RunningTarget
Take the target and drop the lease immediately.
For callers that want a model launched but have no request to hold it
for — gglib model start and the GUI’s start button. The model stays
resident; it is simply evictable from this moment on.