pub struct RuntimeManager { /* private fields */ }Expand description
Runtime Manager - manages active model runtime
Implementations§
Source§impl RuntimeManager
impl RuntimeManager
pub fn new() -> Self
Sourcepub async fn initialize_auto(&self, config: RuntimeConfig) -> Result<String>
pub async fn initialize_auto(&self, config: RuntimeConfig) -> Result<String>
Initialize runtime with automatic format detection and platform-appropriate binary
Sourcepub async fn initialize(&self, config: RuntimeConfig) -> Result<String>
pub async fn initialize(&self, config: RuntimeConfig) -> Result<String>
Initialize runtime with specified configuration
Sourcepub async fn get_base_url(&self) -> Option<String>
pub async fn get_base_url(&self) -> Option<String>
Get the current runtime’s base URL (lock-free)
Sourcepub async fn health_check(&self) -> Result<String>
pub async fn health_check(&self) -> Result<String>
Perform health check (lock-free read)
Sourcepub async fn get_metadata(&self) -> Option<RuntimeMetadata>
pub async fn get_metadata(&self) -> Option<RuntimeMetadata>
Get runtime metadata (lock-free read)
Sourcepub async fn hot_swap(&self, new_config: RuntimeConfig) -> Result<String>
pub async fn hot_swap(&self, new_config: RuntimeConfig) -> Result<String>
Hot-swap model (shutdown current, initialize new)
Sourcepub async fn get_current_config(&self) -> Option<RuntimeConfig>
pub async fn get_current_config(&self) -> Option<RuntimeConfig>
Get current configuration (lock-free)
Sourcepub async fn generate(
&self,
request: InferenceRequest,
) -> Result<InferenceResponse>
pub async fn generate( &self, request: InferenceRequest, ) -> Result<InferenceResponse>
Perform inference (non-streaming, lock-free read)
Trait Implementations§
Source§impl Default for RuntimeManager
impl Default for RuntimeManager
Auto Trait Implementations§
impl Freeze for RuntimeManager
impl !RefUnwindSafe for RuntimeManager
impl Send for RuntimeManager
impl Sync for RuntimeManager
impl Unpin for RuntimeManager
impl UnsafeUnpin for RuntimeManager
impl !UnwindSafe for RuntimeManager
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
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>
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 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>
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