Struct seaplane_cli::context::formation::FormationCtx
source · pub struct FormationCtx {
pub name_id: String,
pub launch: bool,
pub remote: bool,
pub local: bool,
pub grounded: bool,
pub recursive: bool,
pub cfg_ctx: FormationCfgCtx,
}Expand description
Represents the “Source of Truth” i.e. it combines all the CLI options, ENV vars, and config values into a single structure that can be used later to build models for the API or local structs for serializing
A somewhat counter-intuitive thing about Formations and their models is the there is no “Formation Model” only a “Formation Configuration Model” This is because a “Formation” so to speak is really just a named collection of configurations and info about their traffic weights/activation statuses.
Fields§
§name_id: String§launch: bool§remote: bool§local: bool§grounded: bool§recursive: bool§cfg_ctx: FormationCfgCtxImplementations§
source§impl FormationCtx
impl FormationCtx
sourcepub fn update_from_formation_plan(
&mut self,
matches: &SeaplaneFormationPlanArgMatches<'_>,
flights_db: &Flights
) -> Result<()>
pub fn update_from_formation_plan(
&mut self,
matches: &SeaplaneFormationPlanArgMatches<'_>,
flights_db: &Flights
) -> Result<()>
flight is the name of the argument for the Flight’s name/id
sourcepub fn configuration_model(
&self,
ctx: &Ctx
) -> Result<FormationConfigurationModel>
pub fn configuration_model(
&self,
ctx: &Ctx
) -> Result<FormationConfigurationModel>
Creates a new seaplane::api::compute::v1::FormationConfiguration from the contained values
Trait Implementations§
source§impl Clone for FormationCtx
impl Clone for FormationCtx
source§fn clone(&self) -> FormationCtx
fn clone(&self) -> FormationCtx
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more