pub struct StartupRollback<'a> { /* private fields */ }Expand description
Tracks containers that should be removed if startup fails.
Implementations§
Source§impl<'a> StartupRollback<'a>
impl<'a> StartupRollback<'a>
Sourcepub fn record(&mut self, container: &SpawnedContainer)
pub fn record(&mut self, container: &SpawnedContainer)
Record a container for later rollback.
Sourcepub fn record_id(&mut self, container_id: impl Into<String>)
pub fn record_id(&mut self, container_id: impl Into<String>)
Record a container id for later rollback.
Sourcepub fn container_ids(&self) -> &[String]
pub fn container_ids(&self) -> &[String]
Return currently tracked container ids.
Sourcepub fn disarm(self) -> Vec<String>
pub fn disarm(self) -> Vec<String>
Disarm the guard and return tracked ids without removing containers.
Sourcepub async fn rollback(self) -> Result<CleanupReport, DockerError>
pub async fn rollback(self) -> Result<CleanupReport, DockerError>
Remove all tracked containers and disarm the guard.
Trait Implementations§
Source§impl<'a> Debug for StartupRollback<'a>
impl<'a> Debug for StartupRollback<'a>
Auto Trait Implementations§
impl<'a> Freeze for StartupRollback<'a>
impl<'a> !RefUnwindSafe for StartupRollback<'a>
impl<'a> Send for StartupRollback<'a>
impl<'a> Sync for StartupRollback<'a>
impl<'a> Unpin for StartupRollback<'a>
impl<'a> UnsafeUnpin for StartupRollback<'a>
impl<'a> !UnwindSafe for StartupRollback<'a>
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> 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::RequestSource§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