pub trait SnapshotDriver {
// Required methods
fn registry_json(
&mut self,
root: &str,
) -> Result<String, SnapshotDriverError>;
fn create_snapshot(
&mut self,
canister_id: &str,
) -> Result<String, SnapshotDriverError>;
fn stop_canister(
&mut self,
canister_id: &str,
) -> Result<(), SnapshotDriverError>;
fn start_canister(
&mut self,
canister_id: &str,
) -> Result<(), SnapshotDriverError>;
fn download_snapshot(
&mut self,
canister_id: &str,
snapshot_id: &str,
artifact_path: &Path,
) -> Result<(), SnapshotDriverError>;
fn create_snapshot_command(&self, canister_id: &str) -> String;
fn stop_canister_command(&self, canister_id: &str) -> String;
fn start_canister_command(&self, canister_id: &str) -> String;
fn download_snapshot_command(
&self,
canister_id: &str,
snapshot_id: &str,
artifact_path: &Path,
) -> String;
}Expand description
SnapshotDriver
Required Methods§
Sourcefn registry_json(&mut self, root: &str) -> Result<String, SnapshotDriverError>
fn registry_json(&mut self, root: &str) -> Result<String, SnapshotDriverError>
Load the root registry JSON used to resolve child snapshot targets.
Sourcefn create_snapshot(
&mut self,
canister_id: &str,
) -> Result<String, SnapshotDriverError>
fn create_snapshot( &mut self, canister_id: &str, ) -> Result<String, SnapshotDriverError>
Create one canister snapshot and return its snapshot id.
Sourcefn stop_canister(
&mut self,
canister_id: &str,
) -> Result<(), SnapshotDriverError>
fn stop_canister( &mut self, canister_id: &str, ) -> Result<(), SnapshotDriverError>
Stop one canister before snapshot creation.
Sourcefn start_canister(
&mut self,
canister_id: &str,
) -> Result<(), SnapshotDriverError>
fn start_canister( &mut self, canister_id: &str, ) -> Result<(), SnapshotDriverError>
Start one canister after snapshot capture.
Sourcefn download_snapshot(
&mut self,
canister_id: &str,
snapshot_id: &str,
artifact_path: &Path,
) -> Result<(), SnapshotDriverError>
fn download_snapshot( &mut self, canister_id: &str, snapshot_id: &str, artifact_path: &Path, ) -> Result<(), SnapshotDriverError>
Download one snapshot into the supplied artifact directory.
Sourcefn create_snapshot_command(&self, canister_id: &str) -> String
fn create_snapshot_command(&self, canister_id: &str) -> String
Render the planned create command for dry-run output.
Sourcefn stop_canister_command(&self, canister_id: &str) -> String
fn stop_canister_command(&self, canister_id: &str) -> String
Render the planned stop command for dry-run output.
Sourcefn start_canister_command(&self, canister_id: &str) -> String
fn start_canister_command(&self, canister_id: &str) -> String
Render the planned start command for dry-run output.