pub struct SandboxImage {
pub exec_uid: 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 and gid the supervised command runs as.
session_root: &'static strDirectory a session’s files live under, and the only place exec_uid may write.
port: u16Port the agent serves, both its own protocol and any lifecycle hooks.
isolation: IsolationImplementations§
Source§impl SandboxImage
impl SandboxImage
Sourcepub fn exec_gid(&self) -> u32
pub fn exec_gid(&self) -> u32
Gid the supervised command runs as, always equal to the exec uid.
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 Freeze 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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.