pub struct MaintenanceService<S: ?Sized> { /* private fields */ }Expand description
Maintenance-policy decorator that preserves pending client work by rejecting before execution.
Implementations§
Source§impl<S: ?Sized> MaintenanceService<S>
impl<S: ?Sized> MaintenanceService<S>
Sourcepub fn new(
inner: Arc<S>,
controller: MaintenanceController,
retry_after_seconds: u64,
) -> Self
pub fn new( inner: Arc<S>, controller: MaintenanceController, retry_after_seconds: u64, ) -> Self
Wraps a service with a runtime maintenance gate.
Sourcepub const fn controller(&self) -> &MaintenanceController
pub const fn controller(&self) -> &MaintenanceController
Returns the handle used by the host’s authenticated control plane.
Trait Implementations§
Source§impl<S> ExchangeService for MaintenanceService<S>where
S: ExchangeService + ?Sized,
impl<S> ExchangeService for MaintenanceService<S>where
S: ExchangeService + ?Sized,
Source§fn exchange<'life0, 'async_trait>(
&'life0 self,
auth: AuthContext,
request: SyncRequest,
) -> Pin<Box<dyn Future<Output = Result<SyncResponse, ServerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exchange<'life0, 'async_trait>(
&'life0 self,
auth: AuthContext,
request: SyncRequest,
) -> Pin<Box<dyn Future<Output = Result<SyncResponse, ServerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Processes one authenticated bidirectional exchange.
Source§fn bootstrap<'life0, 'async_trait>(
&'life0 self,
auth: AuthContext,
request: BootstrapRequest,
) -> Pin<Box<dyn Future<Output = Result<BootstrapResponse, ServerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn bootstrap<'life0, 'async_trait>(
&'life0 self,
auth: AuthContext,
request: BootstrapRequest,
) -> Pin<Box<dyn Future<Output = Result<BootstrapResponse, ServerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Begins or resumes one authenticated consistent snapshot.
Auto Trait Implementations§
impl<S> Freeze for MaintenanceService<S>
impl<S> RefUnwindSafe for MaintenanceService<S>
impl<S> Send for MaintenanceService<S>
impl<S> Sync for MaintenanceService<S>
impl<S> Unpin for MaintenanceService<S>
impl<S> UnsafeUnpin for MaintenanceService<S>
impl<S> UnwindSafe for MaintenanceService<S>
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