pub struct ServerService {
runner: Arc<dyn ProcessRunner>,
}Expand description
Service for managing model server processes.
Fields§
§runner: Arc<dyn ProcessRunner>Implementations§
Source§impl ServerService
impl ServerService
Sourcepub fn new(runner: Arc<dyn ProcessRunner>) -> Self
pub fn new(runner: Arc<dyn ProcessRunner>) -> Self
Create a new server service.
Sourcepub async fn start(
&self,
config: ServerConfig,
) -> Result<ProcessHandle, CoreError>
pub async fn start( &self, config: ServerConfig, ) -> Result<ProcessHandle, CoreError>
Start a model server.
Sourcepub async fn is_running(&self, handle: &ProcessHandle) -> bool
pub async fn is_running(&self, handle: &ProcessHandle) -> bool
Check if a server is still running.
Sourcepub async fn health(
&self,
handle: &ProcessHandle,
) -> Result<ServerHealth, CoreError>
pub async fn health( &self, handle: &ProcessHandle, ) -> Result<ServerHealth, CoreError>
Get health status of a server.
Sourcepub async fn list_running(&self) -> Result<Vec<ProcessHandle>, CoreError>
pub async fn list_running(&self) -> Result<Vec<ProcessHandle>, CoreError>
List all running server handles.
Auto Trait Implementations§
impl Freeze for ServerService
impl !RefUnwindSafe for ServerService
impl Send for ServerService
impl Sync for ServerService
impl Unpin for ServerService
impl !UnwindSafe for ServerService
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