pub struct ServiceGroupRuntime { /* private fields */ }Expand description
Native runtime settings owned by one ServiceGroup.
The group’s logical ServiceGroup::name remains distinct from an optional runtime pod name
and the optional systemd service name. All settings are group-scoped; adapters must not assign
them to an arbitrary member service.
Implementations§
Source§impl ServiceGroupRuntime
impl ServiceGroupRuntime
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates empty group-runtime settings for incremental adapter mapping.
Sourcepub fn set_runtime_name(&mut self, name: Sourced<ProtectedString>)
pub fn set_runtime_name(&mut self, name: Sourced<ProtectedString>)
Sets the pod/runtime name distinct from the neutral group key.
Sourcepub const fn runtime_name(&self) -> Option<&Sourced<ProtectedString>>
pub const fn runtime_name(&self) -> Option<&Sourced<ProtectedString>>
Returns the explicit pod/runtime name.
Sourcepub fn set_service_name(&mut self, name: Sourced<ProtectedString>)
pub fn set_service_name(&mut self, name: Sourced<ProtectedString>)
Sets the systemd service name distinct from the logical and runtime names.
Sourcepub const fn service_name(&self) -> Option<&Sourced<ProtectedString>>
pub const fn service_name(&self) -> Option<&Sourced<ProtectedString>>
Returns the explicit systemd service name.
Sourcepub fn set_host_mappings(&mut self, values: Vec<Sourced<HostMapping>>)
pub fn set_host_mappings(&mut self, values: Vec<Sourced<HostMapping>>)
Sets pod host mappings, preserving omitted versus explicit-empty state.
Sourcepub fn set_host_mappings_with_origins(
&mut self,
values: Vec<Sourced<HostMapping>>,
origins: Vec<Provenance>,
)
pub fn set_host_mappings_with_origins( &mut self, values: Vec<Sourced<HostMapping>>, origins: Vec<Provenance>, )
Sets pod host mappings with collection-level provenance.
Sourcepub fn add_host_mapping(&mut self, value: Sourced<HostMapping>)
pub fn add_host_mapping(&mut self, value: Sourced<HostMapping>)
Appends one pod host mapping in source order.
Sourcepub fn host_mappings(&self) -> Option<&[Sourced<HostMapping>]>
pub fn host_mappings(&self) -> Option<&[Sourced<HostMapping>]>
Returns pod host mappings, preserving omitted versus explicit-empty state.
Sourcepub fn host_mappings_origins(&self) -> &[Provenance]
pub fn host_mappings_origins(&self) -> &[Provenance]
Returns collection-level pod-host-mapping provenance.
Sourcepub fn set_ports(&mut self, values: Vec<Sourced<Port>>)
pub fn set_ports(&mut self, values: Vec<Sourced<Port>>)
Sets pod ports, preserving omitted versus explicit-empty state.
Sourcepub fn set_ports_with_origins(
&mut self,
values: Vec<Sourced<Port>>,
origins: Vec<Provenance>,
)
pub fn set_ports_with_origins( &mut self, values: Vec<Sourced<Port>>, origins: Vec<Provenance>, )
Sets pod ports with collection-level provenance.
Sourcepub fn ports(&self) -> Option<&[Sourced<Port>]>
pub fn ports(&self) -> Option<&[Sourced<Port>]>
Returns pod ports, preserving omitted versus explicit-empty state.
Sourcepub fn ports_origins(&self) -> &[Provenance]
pub fn ports_origins(&self) -> &[Provenance]
Returns collection-level pod-port provenance.
Sourcepub fn set_networks(&mut self, values: Vec<Sourced<NetworkAttachment>>)
pub fn set_networks(&mut self, values: Vec<Sourced<NetworkAttachment>>)
Sets pod network attachments, preserving omitted versus explicit-empty state.
Sourcepub fn set_networks_with_origins(
&mut self,
values: Vec<Sourced<NetworkAttachment>>,
origins: Vec<Provenance>,
)
pub fn set_networks_with_origins( &mut self, values: Vec<Sourced<NetworkAttachment>>, origins: Vec<Provenance>, )
Sets pod network attachments with collection-level provenance.
Sourcepub fn add_network(&mut self, value: Sourced<NetworkAttachment>)
pub fn add_network(&mut self, value: Sourced<NetworkAttachment>)
Appends one pod network attachment in source order.
Sourcepub fn replace_network(
&mut self,
index: usize,
value: Sourced<NetworkAttachment>,
) -> Result<Sourced<NetworkAttachment>, ModelError>
pub fn replace_network( &mut self, index: usize, value: Sourced<NetworkAttachment>, ) -> Result<Sourced<NetworkAttachment>, ModelError>
Replaces one pod network attachment without changing authored order.
§Errors
Returns ModelError::UnknownServiceGroupRuntimeNetworkIndex when index is outside
the explicitly authored attachment collection.
Sourcepub fn networks(&self) -> Option<&[Sourced<NetworkAttachment>]>
pub fn networks(&self) -> Option<&[Sourced<NetworkAttachment>]>
Returns pod network attachments, preserving omitted versus explicit-empty state.
Sourcepub fn networks_origins(&self) -> &[Provenance]
pub fn networks_origins(&self) -> &[Provenance]
Returns collection-level pod-network provenance.
Sourcepub fn set_user_namespace(&mut self, value: Sourced<ProtectedString>)
pub fn set_user_namespace(&mut self, value: Sourced<ProtectedString>)
Sets the raw-preserving pod user-namespace mode.
Sourcepub const fn user_namespace(&self) -> Option<&Sourced<ProtectedString>>
pub const fn user_namespace(&self) -> Option<&Sourced<ProtectedString>>
Returns the explicit pod user-namespace mode.
Sourcepub fn set_mounts(&mut self, values: Vec<Sourced<Mount>>)
pub fn set_mounts(&mut self, values: Vec<Sourced<Mount>>)
Sets pod mounts, preserving omitted versus explicit-empty state.
Sourcepub fn set_mounts_with_origins(
&mut self,
values: Vec<Sourced<Mount>>,
origins: Vec<Provenance>,
)
pub fn set_mounts_with_origins( &mut self, values: Vec<Sourced<Mount>>, origins: Vec<Provenance>, )
Sets pod mounts with collection-level provenance.
Sourcepub fn mounts(&self) -> Option<&[Sourced<Mount>]>
pub fn mounts(&self) -> Option<&[Sourced<Mount>]>
Returns pod mounts, preserving omitted versus explicit-empty state.
Sourcepub fn mounts_origins(&self) -> &[Provenance]
pub fn mounts_origins(&self) -> &[Provenance]
Returns collection-level pod-mount provenance.
Sourcepub fn set_shm_size(&mut self, value: Sourced<ProtectedString>)
pub fn set_shm_size(&mut self, value: Sourced<ProtectedString>)
Sets the raw protected pod shared-memory-size spelling.
Sourcepub const fn shm_size(&self) -> Option<&Sourced<ProtectedString>>
pub const fn shm_size(&self) -> Option<&Sourced<ProtectedString>>
Returns the raw protected pod shared-memory-size spelling.
Sourcepub fn set_exit_policy(&mut self, value: Sourced<GroupExitPolicy>)
pub fn set_exit_policy(&mut self, value: Sourced<GroupExitPolicy>)
Sets the pod exit policy.
Sourcepub const fn exit_policy(&self) -> Option<&Sourced<GroupExitPolicy>>
pub const fn exit_policy(&self) -> Option<&Sourced<GroupExitPolicy>>
Returns the explicit pod exit policy.
Sourcepub fn set_stop_timeout(&mut self, value: Sourced<StopTimeout>)
pub fn set_stop_timeout(&mut self, value: Sourced<StopTimeout>)
Sets the raw stop-grace duration for the pod.
Sourcepub const fn stop_timeout(&self) -> Option<&Sourced<StopTimeout>>
pub const fn stop_timeout(&self) -> Option<&Sourced<StopTimeout>>
Returns the explicit raw pod stop-grace duration.
Trait Implementations§
Source§impl Clone for ServiceGroupRuntime
impl Clone for ServiceGroupRuntime
Source§fn clone(&self) -> ServiceGroupRuntime
fn clone(&self) -> ServiceGroupRuntime
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more