pub struct DeploymentManager { /* private fields */ }Expand description
Deployment manager for model versions
Implementations§
Source§impl DeploymentManager
impl DeploymentManager
Sourcepub fn new(storage: Arc<dyn ModelStorage>) -> Self
pub fn new(storage: Arc<dyn ModelStorage>) -> Self
Create a new deployment manager
Sourcepub async fn deploy_to_production(
&self,
version_id: Uuid,
model: &VersionedModel,
) -> Result<String>
pub async fn deploy_to_production( &self, version_id: Uuid, model: &VersionedModel, ) -> Result<String>
Deploy a model version to production
Sourcepub async fn deploy_with_strategy(
&self,
version_id: Uuid,
model: &VersionedModel,
config: DeploymentConfig,
) -> Result<String>
pub async fn deploy_with_strategy( &self, version_id: Uuid, model: &VersionedModel, config: DeploymentConfig, ) -> Result<String>
Deploy using specific strategy
Sourcepub async fn rollback(
&self,
model_name: &str,
target_version_id: Uuid,
) -> Result<()>
pub async fn rollback( &self, model_name: &str, target_version_id: Uuid, ) -> Result<()>
Rollback to a previous version
Sourcepub async fn get_active_deployment(
&self,
model_name: &str,
) -> Result<Option<ActiveDeployment>>
pub async fn get_active_deployment( &self, model_name: &str, ) -> Result<Option<ActiveDeployment>>
Get active deployment for a model
Sourcepub async fn list_deployments(&self) -> Result<Vec<ActiveDeployment>>
pub async fn list_deployments(&self) -> Result<Vec<ActiveDeployment>>
List all active deployments
Sourcepub async fn get_deployment_history(
&self,
model_name: &str,
) -> Result<Vec<DeploymentEvent>>
pub async fn get_deployment_history( &self, model_name: &str, ) -> Result<Vec<DeploymentEvent>>
Get deployment history
Sourcepub async fn update_traffic_percentage(
&self,
deployment_id: &str,
percentage: f64,
) -> Result<()>
pub async fn update_traffic_percentage( &self, deployment_id: &str, percentage: f64, ) -> Result<()>
Update traffic percentage for gradual rollouts
Sourcepub async fn health_check(&self, deployment_id: &str) -> Result<HealthStatus>
pub async fn health_check(&self, deployment_id: &str) -> Result<HealthStatus>
Health check for a deployment
Sourcepub async fn get_deployment_stats(&self) -> Result<DeploymentStatistics>
pub async fn get_deployment_stats(&self) -> Result<DeploymentStatistics>
Get deployment statistics
Auto Trait Implementations§
impl !Freeze for DeploymentManager
impl !RefUnwindSafe for DeploymentManager
impl Send for DeploymentManager
impl Sync for DeploymentManager
impl Unpin for DeploymentManager
impl UnsafeUnpin for DeploymentManager
impl !UnwindSafe for DeploymentManager
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 more