pub struct ManagerHandle<R: ContainerRuntime + 'static> { /* private fields */ }Expand description
Newtype adapter turning an Arc<LifecycleManager<R>> into a
LifecycleHandle.
Implementations§
Source§impl<R: ContainerRuntime + 'static> ManagerHandle<R>
impl<R: ContainerRuntime + 'static> ManagerHandle<R>
Sourcepub fn new(inner: Arc<LifecycleManager<R>>) -> Self
pub fn new(inner: Arc<LifecycleManager<R>>) -> Self
Wrap a shared manager.
Sourcepub fn manager(&self) -> &Arc<LifecycleManager<R>>
pub fn manager(&self) -> &Arc<LifecycleManager<R>>
Borrow the underlying manager.
Trait Implementations§
Source§impl<R: ContainerRuntime + 'static> Clone for ManagerHandle<R>
impl<R: ContainerRuntime + 'static> Clone for ManagerHandle<R>
Source§impl<R: ContainerRuntime + 'static> LifecycleHandle for ManagerHandle<R>
impl<R: ContainerRuntime + 'static> LifecycleHandle for ManagerHandle<R>
Source§async fn list(&self) -> Result<Vec<ResourceView>, LifecycleHandleError>
async fn list(&self) -> Result<Vec<ResourceView>, LifecycleHandleError>
List every resource managed by this stack with its current view.
Source§async fn get(&self, name: &str) -> Result<ResourceView, LifecycleHandleError>
async fn get(&self, name: &str) -> Result<ResourceView, LifecycleHandleError>
Look up a single resource by name.
Source§async fn restart(&self, name: &str) -> Result<(), LifecycleHandleError>
async fn restart(&self, name: &str) -> Result<(), LifecycleHandleError>
Restart a single resource by name.
Source§async fn logs(
&self,
name: &str,
follow: bool,
) -> Result<LogChunkStream, LifecycleHandleError>
async fn logs( &self, name: &str, follow: bool, ) -> Result<LogChunkStream, LifecycleHandleError>
Stream logs for a single resource. When
follow is true the
stream stays open and emits new chunks as they arrive.Source§fn subscribe_events(&self) -> Receiver<LifecycleEvent>
fn subscribe_events(&self) -> Receiver<LifecycleEvent>
Open a fresh subscription on the lifecycle event broadcast.
Implementations return a
broadcast::Receiver so multiple
consumers (REST handlers, WebSocket sessions, CLI followers)
can read independently.Auto Trait Implementations§
impl<R> Freeze for ManagerHandle<R>
impl<R> RefUnwindSafe for ManagerHandle<R>where
R: RefUnwindSafe,
impl<R> Send for ManagerHandle<R>
impl<R> Sync for ManagerHandle<R>
impl<R> Unpin for ManagerHandle<R>
impl<R> UnsafeUnpin for ManagerHandle<R>
impl<R> UnwindSafe for ManagerHandle<R>where
R: RefUnwindSafe,
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request