pub struct SandboxImage {
pub exec_uid: u32,
pub exec_gid: u32,
pub session_root: &'static str,
pub port: u16,
pub authorization: Authorization,
pub isolation: Isolation,
}Expand description
The values an image must carry for the agent to run in it.
Fields§
§exec_uid: u32Uid the supervised command runs as, resolved from a non-root base USER or the default.
exec_gid: u32Primary gid from the base USER, which may differ from its uid.
session_root: &'static strWritable session directory. Image-owned directories may also be writable on VM backends.
port: u16Port the agent serves, both its own protocol and any lifecycle hooks.
isolation: IsolationImplementations§
Source§impl SandboxImage
impl SandboxImage
Sourcepub fn contract_env_vars(&self) -> [(&'static str, String); 6]
pub fn contract_env_vars(&self) -> [(&'static str, String); 6]
The agent’s configuration contract as (name, value) pairs, in the order the ENV block
lists them.
Sourcepub fn user(&self) -> Option<String>
pub fn user(&self) -> Option<String>
The uid:gid the image runs as, or None when it declares no user and starts as root.
Why the gid is explicit is in the USER comment entrypoint renders.
Sourcepub fn exposed_port(&self) -> String
pub fn exposed_port(&self) -> String
The port the image exposes, as an OCI ExposedPorts key.
Sourcepub fn passwd_entry(&self) -> String
pub fn passwd_entry(&self) -> String
The exec identity’s /etc/passwd line, without a trailing newline.
Sourcepub fn group_entry(&self) -> String
pub fn group_entry(&self) -> String
The exec identity’s /etc/group line, without a trailing newline.
Trait Implementations§
Source§impl Clone for SandboxImage
impl Clone for SandboxImage
impl Copy for SandboxImage
Source§impl Debug for SandboxImage
impl Debug for SandboxImage
impl Eq for SandboxImage
Source§impl PartialEq for SandboxImage
impl PartialEq for SandboxImage
impl StructuralPartialEq for SandboxImage
Auto Trait Implementations§
impl Forget for SandboxImage
impl Freeze for SandboxImage
impl Move for SandboxImage
impl RefUnwindSafe for SandboxImage
impl Send for SandboxImage
impl Sync for SandboxImage
impl Unpin for SandboxImage
impl UnsafeUnpin for SandboxImage
impl UnwindSafe for SandboxImage
Blanket Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.