pub struct MetadataReloadHandle { /* private fields */ }Expand description
The engine half of the deployment admin POST /admin/reload-metadata
(memra#76): re-read the boot MEMRA_MODEL_METADATA file, validate it with
the boot checks, and atomically swap it for new requests. A failed reload
keeps the old set — validation runs BEFORE the swap, never on it.
In-flight requests are unaffected by construction: handlers resolve their
metadata from an Arc cloned at admission, so they keep the set they
started with. Weights, kernel-shaping flags, and the MEMRA_MODELS roster
are out of scope and untouched: an alias the boot roster does not name is
rejected exactly like at boot.
Memory-only: unlike the worker-command handles this one needs no drop on the shutdown signal.
Default is the unwired state (empty set, empty roster, no path): a reload
on it fails closed, which is what deployment-surface tests assert the pre-ready route
with — beyond that, surfaces receive the wired handle from on_ready.
Implementations§
Source§impl MetadataReloadHandle
impl MetadataReloadHandle
Sourcepub fn reload(&self) -> Result<MetadataReloadReceipt, String>
pub fn reload(&self) -> Result<MetadataReloadReceipt, String>
Reload the metadata file. Returns the receipt on success; the old set stays live on any failure.
Trait Implementations§
Source§impl Clone for MetadataReloadHandle
impl Clone for MetadataReloadHandle
Source§fn clone(&self) -> MetadataReloadHandle
fn clone(&self) -> MetadataReloadHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for MetadataReloadHandle
impl Default for MetadataReloadHandle
Source§fn default() -> MetadataReloadHandle
fn default() -> MetadataReloadHandle
Auto Trait Implementations§
impl Freeze for MetadataReloadHandle
impl RefUnwindSafe for MetadataReloadHandle
impl Send for MetadataReloadHandle
impl Sync for MetadataReloadHandle
impl Unpin for MetadataReloadHandle
impl UnsafeUnpin for MetadataReloadHandle
impl UnwindSafe for MetadataReloadHandle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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