pub struct RunningTopology { /* private fields */ }
Expand description
A running topology.
Implementations§
Source§impl RunningTopology
impl RunningTopology
Sourcepub async fn wait_for_unexpected_finish(&mut self)
pub async fn wait_for_unexpected_finish(&mut self)
Waits for any spawned component to unexpectedly finish.
This can be used in a loop to determine if any component has unexpectedly finished before shutdown was initiated, which usually represents an error or bug with the component.
Sourcepub async fn shutdown(self) -> Result<(), GenericError>
pub async fn shutdown(self) -> Result<(), GenericError>
Triggers the topology to shutdown, waiting until all components have stopped.
This will wait indefinitely for all components to stop. If graceful shutdown with an upper bound is desired, use
shutdown_with_timeout
instead.
§Errors
If the topology fails to shutdown cleanly due to an error in a component, an error will be returned.
Sourcepub async fn shutdown_with_timeout(
self,
timeout: Duration,
) -> Result<(), GenericError>
pub async fn shutdown_with_timeout( self, timeout: Duration, ) -> Result<(), GenericError>
Triggers the topology to shutdown, waiting until all components have stopped or the timeout has elapsed.
§Errors
If the topology fails to shutdown cleanly, either due to an error in a component or the timeout being reached, an error will be returned.
Auto Trait Implementations§
impl !Freeze for RunningTopology
impl !RefUnwindSafe for RunningTopology
impl Send for RunningTopology
impl Sync for RunningTopology
impl Unpin for RunningTopology
impl !UnwindSafe for RunningTopology
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
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>
T
in a tonic::Request
Source§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Tracked
wrapper. Read more§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Tracked
wrapper. Read more