Skip to main content

Manager

Trait Manager 

Source
pub trait Manager {
    // Required methods
    fn deployer_type(&self) -> String;
    fn deploy(
        &self,
        deployer_config: &DeployerConfig,
        cfg: Option<&Container>,
    ) -> Result<(), Box<dyn Error + Send + Sync>>;
    fn undeploy(
        &self,
        deployer_config: &DeployerConfig,
        caproni_config: &CaproniConfig,
    ) -> Result<(), Box<dyn Error + Send + Sync>>;
    fn status(
        &self,
        deployer_config: &DeployerConfig,
        caproni_config: &CaproniConfig,
    ) -> Result<Status, Box<dyn Error + Send + Sync>>;
    fn validate(
        &self,
        deployer_config: &DeployerConfig,
        caproni_config: &CaproniConfig,
    ) -> Result<(), Box<dyn Error + Send + Sync>>;
}
Expand description

The interface for managing deployment lifecycle. Implementations are responsible for deploying and managing applications using specific deployment strategies (e.g. Helm charts).

Required Methods§

Source

fn deployer_type(&self) -> String

The deployer type that this manager handles (e.g. "helm").

Source

fn deploy( &self, deployer_config: &DeployerConfig, cfg: Option<&Container>, ) -> Result<(), Box<dyn Error + Send + Sync>>

Deploys the application to the cluster. If the application is already deployed, this updates it to match the current configuration.

Source

fn undeploy( &self, deployer_config: &DeployerConfig, caproni_config: &CaproniConfig, ) -> Result<(), Box<dyn Error + Send + Sync>>

Removes this deployment from the cluster.

Source

fn status( &self, deployer_config: &DeployerConfig, caproni_config: &CaproniConfig, ) -> Result<Status, Box<dyn Error + Send + Sync>>

Returns the current status of the deployment. Returns an error if unable to determine deployment state.

Source

fn validate( &self, deployer_config: &DeployerConfig, caproni_config: &CaproniConfig, ) -> Result<(), Box<dyn Error + Send + Sync>>

Validates the deployer configuration and referenced files. Returns Ok(()) if valid, or an error describing validation failures. Files in uncloned repository directories should not cause validation to fail.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Manager for xianyun_deploy::deployer::kustomize::manager::Manager

Lets the orchestrator drive a kustomize Manager through the registry.

Source§

impl Manager for xianyun_deploy::deployer::namespace::manager::Manager

Lets the orchestrator drive a namespace Manager through the registry.

Source§

impl<B: HelmBackend> Manager for xianyun_deploy::deployer::helm::manager::Manager<B>

Lets the orchestrator drive a helm Manager through the registry.