pub struct ServiceGroup { /* private fields */ }Expand description
One structural group of application services.
Membership alone does not imply shared Linux namespaces, an infra container, or a target workload kind. Source and target adapters must model or report those semantics separately.
Implementations§
Source§impl ServiceGroup
impl ServiceGroup
Sourcepub const fn new(name: Identifier, ownership: ResourceOwnership) -> Self
pub const fn new(name: Identifier, ownership: ResourceOwnership) -> Self
Creates an empty structural service group.
Sourcepub const fn name(&self) -> &Identifier
pub const fn name(&self) -> &Identifier
Returns the neutral group name.
Sourcepub const fn ownership(&self) -> ResourceOwnership
pub const fn ownership(&self) -> ResourceOwnership
Returns the group lifecycle owner.
Sourcepub fn add_member(
&mut self,
member: Sourced<Identifier>,
) -> Result<(), ModelError>
pub fn add_member( &mut self, member: Sourced<Identifier>, ) -> Result<(), ModelError>
Appends one uniquely named member in source order.
§Errors
Returns ModelError::DuplicateServiceGroupMember when the service was already added.
Sourcepub fn members(&self) -> &[Sourced<Identifier>]
pub fn members(&self) -> &[Sourced<Identifier>]
Returns member service names in source order with relationship provenance.
Sourcepub fn set_runtime(&mut self, runtime: Sourced<ServiceGroupRuntime>)
pub fn set_runtime(&mut self, runtime: Sourced<ServiceGroupRuntime>)
Sets the optional runtime settings associated with this structural group.
These settings do not alter membership semantics. In particular, their presence does not infer namespace sharing for a group that did not author such settings.
Sourcepub const fn runtime(&self) -> Option<&Sourced<ServiceGroupRuntime>>
pub const fn runtime(&self) -> Option<&Sourced<ServiceGroupRuntime>>
Returns the optional native group-runtime settings.
Trait Implementations§
Source§impl Clone for ServiceGroup
impl Clone for ServiceGroup
Source§fn clone(&self) -> ServiceGroup
fn clone(&self) -> ServiceGroup
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more