pub trait DeploymentTarget: Send + Sync {
// Required methods
fn get<'life0, 'async_trait>(
&'life0 self,
components: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<Vec<ComponentSpec>, Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update<'life0, 'async_trait>(
&'life0 self,
components_to_update: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, ComponentResultSpec>, Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
components_to_delete: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, ComponentResultSpec>, Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
Sourcefn get<'life0, 'async_trait>(
&'life0 self,
components: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<Vec<ComponentSpec>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
components: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<Vec<ComponentSpec>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves the current status of components within a deployment.
§Arguments
components- The components whose current status should be retrieveddeployment_spec- The deployment context containing these components
§Returns
A vector of ComponentSpec representing the currently deployed state of the requested components.
§Errors
Returns an error if the current deployment status cannot be determined.
Sourcefn update<'life0, 'async_trait>(
&'life0 self,
components_to_update: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, ComponentResultSpec>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update<'life0, 'async_trait>(
&'life0 self,
components_to_update: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, ComponentResultSpec>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Updates the specified components within a deployment.
§Arguments
components_to_update- The components to be updateddeployment_spec- The deployment context for these components
§Returns
A map where keys are component identifiers and values are ComponentResultSpec
indicating the outcome of each component’s update operation.
§Errors
Returns an error if the update operation cannot be performed. Individual component failures should be reported in the returned map rather than as an overall error.
Sourcefn delete<'life0, 'async_trait>(
&'life0 self,
components_to_delete: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, ComponentResultSpec>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
components_to_delete: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, ComponentResultSpec>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Removes the specified components from a deployment.
§Arguments
components_to_delete- The components to be removeddeployment_spec- The deployment context for these components
§Returns
A map where keys are component identifiers and values are ComponentResultSpec
indicating the outcome of each component’s deletion operation.
§Errors
Returns an error if the delete operation cannot be performed. Individual component failures should be reported in the returned map rather than as an overall error.