pub struct BackupManager { /* private fields */ }Expand description
Manages backups across all data stores.
Implementations§
Source§impl BackupManager
impl BackupManager
Sourcepub fn new(configs: HashMap<String, BackupConfig>) -> Self
pub fn new(configs: HashMap<String, BackupConfig>) -> Self
Create new backup manager.
Sourcepub async fn register_provider(
&self,
name: String,
provider: Arc<dyn BackupProvider>,
) -> Result<(), String>
pub async fn register_provider( &self, name: String, provider: Arc<dyn BackupProvider>, ) -> Result<(), String>
Register a backup provider.
Sourcepub async fn start(&self) -> Result<(), String>
pub async fn start(&self) -> Result<(), String>
Start backup scheduler (spawns background task).
Sourcepub async fn backup(&self, provider_name: &str) -> BackupResult<()>
pub async fn backup(&self, provider_name: &str) -> BackupResult<()>
Create a backup for a specific provider.
Sourcepub async fn get_status(&self) -> HashMap<String, BackupStatus>
pub async fn get_status(&self) -> HashMap<String, BackupStatus>
Get backup status for all providers.
Sourcepub async fn get_provider_status(
&self,
provider_name: &str,
) -> Option<BackupStatus>
pub async fn get_provider_status( &self, provider_name: &str, ) -> Option<BackupStatus>
Get backup status for a specific provider.
Sourcepub async fn restore(
&self,
provider_name: &str,
backup_id: &str,
) -> BackupResult<()>
pub async fn restore( &self, provider_name: &str, backup_id: &str, ) -> BackupResult<()>
Restore from a backup.
Sourcepub async fn list_backups(
&self,
provider_name: &str,
) -> BackupResult<Vec<String>>
pub async fn list_backups( &self, provider_name: &str, ) -> BackupResult<Vec<String>>
List backups for a provider.
Auto Trait Implementations§
impl Freeze for BackupManager
impl !RefUnwindSafe for BackupManager
impl Send for BackupManager
impl Sync for BackupManager
impl Unpin for BackupManager
impl !UnwindSafe for BackupManager
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> 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 moreSource§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