Skip to main content

greentic_deployer/
multi_target.rs

1//! Explicit wrapper around the legacy/provider-oriented deployment flow.
2//!
3//! The current repo contains two different execution families:
4//! - `single_vm`: the stable OSS single-VM adapter
5//! - `multi_target`: the older provider-oriented deployment-pack flow used as
6//!   the integration point for non-single-vm adapters
7//!
8//! This module does not change behavior. It only makes the boundary explicit so
9//! future work can evolve a unified deployer surface over isolated adapters.
10
11use crate::apply;
12use crate::config::{DeployerConfig, OutputFormat};
13use crate::error::Result;
14use crate::plan::PlanContext;
15
16pub use crate::apply::{
17    ApplyPayload, CapabilityPayload, DestroyPayload, ExecutionReport, GeneratePayload,
18    OperationPayload, OperationResult, OutputValidation, PlanPayload, RollbackPayload,
19    StatusPayload,
20};
21
22/// Runs the provider-oriented multi-target deployment flow.
23///
24/// This is intentionally separate from the dedicated `single_vm` adapter path.
25pub async fn run(config: DeployerConfig) -> Result<OperationResult> {
26    apply::run(config).await
27}
28
29/// Runs the provider-oriented multi-target deployment flow with a prebuilt plan.
30pub async fn run_with_plan(config: DeployerConfig, plan: PlanContext) -> Result<OperationResult> {
31    apply::run_with_plan(config, plan).await
32}
33
34pub fn render_operation_result(value: &OperationResult, format: OutputFormat) -> Result<String> {
35    apply::render_operation_result(value, format)
36}