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 LifecycleManager in a ManagerHandle.
The handle is cheaply cloneable: cloning it increments the Arc reference
count without touching the manager or the runtime.
Sourcepub fn manager(&self) -> &Arc<LifecycleManager<R>>
pub fn manager(&self) -> &Arc<LifecycleManager<R>>
Borrow a reference to the underlying shared LifecycleManager.
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>
Return a snapshot of every resource managed by this stack. Read more
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 its manifest-declared name. Read more
Source§async fn restart(&self, name: &str) -> Result<(), LifecycleHandleError>
async fn restart(&self, name: &str) -> Result<(), LifecycleHandleError>
Restart a single resource by its manifest-declared name. Read more
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 by its manifest-declared name. Read more
Source§fn subscribe_events(&self) -> Receiver<LifecycleEvent>
fn subscribe_events(&self) -> Receiver<LifecycleEvent>
Open a fresh subscription on the lifecycle event broadcast channel. Read more
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