pub struct ComposeRuntimePlan {
pub name: String,
pub config: ComposeConfig,
pub service_order: Vec<String>,
pub base_dir: PathBuf,
}Expand description
Stateless plan for translating one Compose project into Runtime inputs.
Fields§
§name: StringProject name (derived from directory name or –project-name).
config: ComposeConfigThe parsed compose config.
service_order: Vec<String>Service boot order (topologically sorted).
base_dir: PathBufBase directory used to resolve relative env_file paths.
Implementations§
Source§impl ComposeRuntimePlan
impl ComposeRuntimePlan
Sourcepub fn new(name: impl Into<String>, config: ComposeConfig) -> Result<Self>
pub fn new(name: impl Into<String>, config: ComposeConfig) -> Result<Self>
Create a new translation plan from a config.
Validates the config and computes the service boot order.
Sourcepub fn with_base_dir(
name: impl Into<String>,
config: ComposeConfig,
base_dir: impl Into<PathBuf>,
) -> Result<Self>
pub fn with_base_dir( name: impl Into<String>, config: ComposeConfig, base_dir: impl Into<PathBuf>, ) -> Result<Self>
Create a compose project with an explicit base directory.
Sourcepub fn build_box_config(
&self,
service_name: &str,
default_network: Option<&str>,
) -> Result<BoxConfig>
pub fn build_box_config( &self, service_name: &str, default_network: Option<&str>, ) -> Result<BoxConfig>
Build a BoxConfig for a single service.
Translates compose service fields into the BoxConfig used by VmManager.
Sourcepub fn default_network_name(&self) -> String
pub fn default_network_name(&self) -> String
Get the network name for this project’s default network.
Sourcepub fn required_networks(&self) -> Vec<String>
pub fn required_networks(&self) -> Vec<String>
Get all network names this project needs (project-prefixed).
Sourcepub fn service_network_aliases(&self, service_name: &str) -> Vec<String>
pub fn service_network_aliases(&self, service_name: &str) -> Vec<String>
DNS aliases to register for a service on its selected Compose network.
The bare service name is always present. User-declared aliases are deduplicated and sorted so endpoint state does not depend on map order.
Sourcepub fn shutdown_order(&self) -> Vec<String>
pub fn shutdown_order(&self) -> Vec<String>
Get the shutdown order (reverse of boot order).
Sourcepub fn health_wait_deps(&self, service_name: &str) -> Vec<String>
pub fn health_wait_deps(&self, service_name: &str) -> Vec<String>
Check if a service requires its dependencies to be healthy before starting.
Returns the list of dependency service names that must reach “healthy” status.
Sourcepub fn completed_wait_deps(&self, service_name: &str) -> Vec<String>
pub fn completed_wait_deps(&self, service_name: &str) -> Vec<String>
Dependencies this service must wait to run to completion (exit 0) before
starting — depends_on: { dep: { condition: service_completed_successfully } }.
Sourcepub fn healthcheck(&self, service_name: &str) -> Option<HealthCheckSpec>
pub fn healthcheck(&self, service_name: &str) -> Option<HealthCheckSpec>
Get the health check config for a service, if defined.
Sourcepub fn healthcheck_disabled(&self, service_name: &str) -> bool
pub fn healthcheck_disabled(&self, service_name: &str) -> bool
Return true when a service explicitly disables its health check.
Trait Implementations§
Source§impl Clone for ComposeRuntimePlan
impl Clone for ComposeRuntimePlan
Source§fn clone(&self) -> ComposeRuntimePlan
fn clone(&self) -> ComposeRuntimePlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ComposeRuntimePlan
impl RefUnwindSafe for ComposeRuntimePlan
impl Send for ComposeRuntimePlan
impl Sync for ComposeRuntimePlan
impl Unpin for ComposeRuntimePlan
impl UnsafeUnpin for ComposeRuntimePlan
impl UnwindSafe for ComposeRuntimePlan
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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