pub struct IpcServer { /* private fields */ }Implementations§
Source§impl IpcServer
impl IpcServer
pub fn new( socket_path: &str, schedulers: HashMap<u32, Arc<dyn ReplicaScheduler + Send + Sync>>, shm_manager: Option<Arc<ShmManager>>, ) -> Self
pub fn new_with_lookup( socket_path: &str, scheduler_lookup: SchedulerLookup, shm_manager: Option<Arc<ShmManager>>, ) -> Self
Sourcepub fn with_auth_token(self, token: impl Into<String>) -> Self
pub fn with_auth_token(self, token: impl Into<String>) -> Self
Require every inference request to carry this token in
request.metadata.auth_token. Requests without the token
or with a wrong token receive STATUS_ERR: Unauthorized.
Trait Implementations§
Source§impl TransportServer for IpcServer
impl TransportServer for IpcServer
Source§fn run<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start the transport server
This should block until the server is shut down
Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gracefully shutdown the server
Source§fn transport_type(&self) -> &'static str
fn transport_type(&self) -> &'static str
Get the transport type name (for logging/debugging)
Auto Trait Implementations§
impl Freeze for IpcServer
impl !RefUnwindSafe for IpcServer
impl Send for IpcServer
impl Sync for IpcServer
impl Unpin for IpcServer
impl UnsafeUnpin for IpcServer
impl !UnwindSafe for IpcServer
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> 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